bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

erroneous MAKEFLAGS test in GNU Make's manual


From: Paolo Bonzini
Subject: erroneous MAKEFLAGS test in GNU Make's manual
Date: Tue, 05 Oct 2010 12:41:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

The manual's example of using $(findstring) to test MAKEFLAGS:

     archive.a: ...
     ifneq (,$(findstring t,$(MAKEFLAGS)))
             +touch archive.a
             +ranlib -t archive.a
     else
             ranlib archive.a
     endif

was broken by the addition of --no-print-directory to $(MAKEFLAGS). Here, "make --no-print-directory" will look as a false positive.

I suggest reverting this addition, or changing the text in the manual to

    ifneq (t,$(findstring t, $(filter-out --%, $(MAKEFLAGS))))
             +touch archive.a
             +ranlib -t archive.a
    else
             ranlib archive.a
    endif

Thanks,

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]