Make versions: 3.77, 3.79

I am unable to get the feature 'target-specific variables' to work.

It appears that make attempts to interpret the assignment as a 
dependency (pre-requisite).

I found the bit about escaping the equal sign in the NEWS document 
for 3.77 changes - it ought to be mentioned in the texinfo docs (or 
at least referenced from the section dealing with target-specific 
variables).

This is/would be a GREAT feature.

At the bottom is a makefile with which I tested the feature.
Run 'make showResults' to see what output I received.
Target test3 is commented out, because the syntax dissallows running 
the makefile.

Sincerely,
Henry Miller
[EMAIL PROTECTED]


Here is a simplistic makefile with which I tested it:
### -*- Mode: Makefile -*-

aDir = .
bDir = doc
cDir = templates

pkgDir = $(aDir)


test1 :
        @echo 'Here on elsewhere at $(pkgDir)'

test2 : pkgDir\=$(bDir)
        @echo 'Here on elsewhere at $(pkgDir)'

#test3 : pkgDir=$(cDir)
#       @echo 'Here on elsewhere at $(pkgDir)'

test4 : test1 empty pkgDir\=$(cDir)
        @echo 'Here on elsewhere at $(pkgDir)'

empty :


showResults :
        @echo ''; echo ''
        @echo 'Results from test1:'
        @echo 'Here on elsewhere at .'
        @echo ''; echo ''
        @echo 'Results from test1:'
        @echo 'make: *** No rule to make target \'pkgDir=doc\', 
needed by \'test2\'.  Stop.'
        @echo ''; echo ''
        @echo 'Results from test3:'
        @echo 'Makefile:17: *** commands commence before first target.  Stop.'
        @echo ''; echo ''
        @echo 'Results from test4:'
        @echo ''
        @echo 'Here on elsewhere at .'
        @echo 'make: *** No rule to make target \'pkgDir=templates\', 
needed by \`test4\'.  Stop.'
        @echo ''; echo ''

Reply via email to