Given the following Makefile:

    # Default variable values
    TESTS=default
    FOO=default
    BAR=default

    # Target specific variable values
    tests: TESTS=specific
    foo: FOO=specific
    bar: BAR=specific

    # Rules
    tests: foo
    foo: bar
    bar:
        @echo $(TESTS) $(FOO) $(BAR) 

I assumed that the output would be:

    make tests
    specific specific specific

    make foo
    default specific specific

    make bar
    default default specific

However what really happens is:

    make tests
    default specific specific   <<*** Error *** - target specific variable for
                                                  'tests' target is not used.

    make foo
    default specific specific   <<*** Correct

    make bar                    <<*** Correct
    default default specific

It appears that the target specific variables might not be working for the
default target.

Reid

-- 
Reid Madsen                             [EMAIL PROTECTED]                      
Senior Member, Tech. Staff              (972) 536-3261 (Desk)
I2 Technologies                         (214) 850-9613 (Cellular)
 

Reply via email to