Summary: Fix "7.3 Conditionals that Test Flags" in the
                 Project: make
            Submitted by: dgoncharov
            Submitted on: Sat 21 May 2022 01:21:51 AM UTC
                Severity: 3 - Normal
              Item Group: Documentation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: None
           Fixed Release: None
           Triage Status: None


Follow-up Comments:

Date: Sat 21 May 2022 01:21:51 AM UTC By: Dmitry Goncharov <dgoncharov>
In paragraph "7.3 Conditionals that Test Flags" the manual contains the
following recommendation

For example, here is how to arrange to use ‘ranlib -t’ to finish marking
an archive file up to date:

archive.a: …
ifneq (,$(findstring t,$(MAKEFLAGS)))

When the user specifies long or -I<path> options, this piece of code specified
above will find 't' when -t was not specified.
$ make --no-print-directory -I/tmp
causes MAKEFLAGS to contain '--no-print-directory -I/tmp'.

We can filter out long and -I<path> options with 'filter-out -%'.
$(findstring t,$(filter-out -%,$(MAKEFLAGS)))


Reply to this item at:


  Message sent via Savannah

Reply via email to