Skip to content

MAKEFLAGS drops leading "-" in 4.3 release #2

@chrisdonlan

Description

@chrisdonlan
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Minimal example of the issue:

# foo/makefile
echo-makeflags:
  @echo $(MAKEFLAGS)

Command line:

$: make -B echo-makeflags
B

When passing to submake, I have the following problem: suppose there are no makeflags?

# bar/makefile

relay-%:
ifdef $(MAKEFLAGS)
   some-command-relay-technique $* -$(MAKEFLAGS)
else
   some-command-relay-technique $*
endif

# fix

ifdef MAKEFLAGS
RELAYFLAGS+=-$(MAKEFLAGS)
endif

# but now RELAYFLAGS is introduced

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions