This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253292 - Selecting "Rebuild if properties have changed" changes the Makefile-${CND_CONF}.mk such that $(<) is not expected
Summary: Selecting "Rebuild if properties have changed" changes the Makefile-${CND_CON...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-02 16:58 UTC by dgtlrift
Modified: 2016-07-20 01:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dgtlrift 2015-07-02 16:58:49 UTC
When selecting "Rebuild if properties have changed" the $(<) automatic make variable is not expected.  This is due to the way it is changed:
from
${OBJECTDIR}/<source>.o: <source>.cpp 
to
${OBJECTDIR}/<source>.o: nbproject/Makefile-${CND_CONF}.mk <source>.cpp 

The easiest workaround is to have the makefile render code change the line from
${OBJECTDIR}/<source>.o: <source>.cpp 
to
${OBJECTDIR}/<source>.o: <source>.cpp nbproject/Makefile-${CND_CONF}.mk

This will maintain $(<) so it can be used to retrieve the associated source file for the target, allowing such as the following:

ASTYLE	    :=astyle
ASTYLEFLAGS :=--style=allman -s4 -p -D -H -j -xC78 -S -f

BACKUP_COMPILE.cc:=$(COMPILE.cc)
COMPILE.cc= \
$(warning "@=[$(@)]") \
$(warning "%=[$(%)]") \
$(warning "<=[$(<)]") \
$(warning "?=[$(?)]") \
$(warning "^=[$(^)]") \
$(warning "+=[$(+)]") \
$(warning "|=[$(|)]") \
$(warning "*=[$(*)]") \
$(ASTYLE) $(ASTYLEFLAGS) $(<) && $(BACKUP_COMPILE.cc)
Comment 1 Alexander Simon 2016-07-18 09:46:11 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/7ac94db86e65
Comment 2 Quality Engineering 2016-07-20 01:51:23 UTC
Integrated into 'main-silver', will be available in build *201607200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7ac94db86e65
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #253292 Selecting "Rebuild if properties have changed" changes the Makefile-${CND_CONF}.mk such that $(<) is not expected