MathStuf
19th June 2008, 16:49
Hi,
I have been trying to get qmake to install by headers for me using an install target. The following is what I have been able to get so far, but I cannot get the headers that are created by uic for installation.
ALL_HEADERS = $${HEADERS} $${GENERATED_FILES}
devel.path = $${HEADER_DIR}
devel.depends = compiler_uic_make_all
devel.extra = -$(MKDIR) $${HEADER_DIR} && $(COPY_FILE) --parents $${ALL_HEADERS} $${HEADER_DIR} && cd $${HEADER_DIR} && chmod 644 $${ALL_HEADERS}
devel.uninstall = -cd $${HEADER_DIR}; $(DEL_FILE) $${ALL_HEADERS}
INSTALLS += devel
The problem is that $${GENERATED_FILES} is empty when this is run (before the uic compiler is loaded I'm assuming). Is there a way to have it not expanded until it is full? It's not in the Makefile, so it can't be put that late unfortunately.
I'd like to use the .installs of devel, but that flattens the structure of the headers, which isn't what i want. cp has a --parents switch which (I'm guessing) does what I want. I was hoping if there was anything I can do to get this to work without using a bash script or something of the sort. Thank you.
--MathStuf
I have been trying to get qmake to install by headers for me using an install target. The following is what I have been able to get so far, but I cannot get the headers that are created by uic for installation.
ALL_HEADERS = $${HEADERS} $${GENERATED_FILES}
devel.path = $${HEADER_DIR}
devel.depends = compiler_uic_make_all
devel.extra = -$(MKDIR) $${HEADER_DIR} && $(COPY_FILE) --parents $${ALL_HEADERS} $${HEADER_DIR} && cd $${HEADER_DIR} && chmod 644 $${ALL_HEADERS}
devel.uninstall = -cd $${HEADER_DIR}; $(DEL_FILE) $${ALL_HEADERS}
INSTALLS += devel
The problem is that $${GENERATED_FILES} is empty when this is run (before the uic compiler is loaded I'm assuming). Is there a way to have it not expanded until it is full? It's not in the Makefile, so it can't be put that late unfortunately.
I'd like to use the .installs of devel, but that flattens the structure of the headers, which isn't what i want. cp has a --parents switch which (I'm guessing) does what I want. I was hoping if there was anything I can do to get this to work without using a bash script or something of the sort. Thank you.
--MathStuf