[Qt-creator] qmake: how to disable error ignoring for make recipe in Makefile?

Andrzej Telszewski atelszewski at gmail.com
Mon Feb 22 14:26:48 CET 2016


On 22/02/16 14:16, Andrzej Telszewski wrote:
> On 22/02/16 14:03, Oswald Buddenhagen wrote:
>> On Mon, Feb 22, 2016 at 12:48:58PM +0100, Andrzej Telszewski wrote:
>>> When I generate Makefile with qmake, the recipe for installing looks
>>> something
>>> like this:
>>>
>>> install_target: first FORCE
>>>     @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/sbin/ || $(MKDIR)
>>> $(INSTALL_ROOT)/usr/sbin/
>>>     -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)"
>>> "$(INSTALL_ROOT)/usr/sbin/$(QMAKE_TARGET)"
>>>     -$(STRIP) "$(INSTALL_ROOT)/usr/sbin/$(QMAKE_TARGET)"
>>>
>>> Hyphens "-" are added in front of $(INSTALL_PROGRAM) and $(STRIP).
>>> These "-"
>>> allow to ignore recipe errors.
>>>
>>> But I would actually like to switch on failing on recipe error.
>>> How can I do it?
>>> That is, what and where I have to specify for the "-" to be removed?
>>>
>> there is no way. i consider this a long-standing bug and would happily
>> accept a respective patch if it's done thoroughly. target branch 5.7.
>
> I'm not yet up to the level of developing Qt.
> For now I will use some "sed" magic on the resultant Makefile.
>
> Thanks for the info!
>

I ended up with:
sed -e 's/-$(INSTALL_PROGRAM)/$(INSTALL_PROGRAM)/g' -i Makefile
sed -e 's/-$(STRIP)/$(STRIP)/g' -i Makefile
sed -e 's/-$(DEL_FILE)/$(DEL_FILE)/g' -i Makefile
sed -e 's/-$(DEL_DIR)/$(DEL_DIR)/g' -i Makefile

-- 
Best regards,
Andrzej Telszewski



More information about the Qt-creator mailing list