bug-make
[Top][All Lists]
Advanced

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

[bug #60811] Add long-form aliases for automatic variables


From: Gwyneth Morgan
Subject: [bug #60811] Add long-form aliases for automatic variables
Date: Sat, 11 Mar 2023 20:02:28 -0500 (EST)

Follow-up Comment #3, bug #60811 (project make):

Will this patch be considered? This would simplify writing understandable
Makefiles that work across implementations.

If long-form aliases like this are unwanted, adding $> as an alias to $^ would
work as well.

[comment #0 original submission:]
> BSD Make has several long-form aliases for automatic variables, such as
`${.TARGET}` for `$@`. These are helpful for readability.
> 
> GNU Make and BSD Make both have automatic variables for all prerequisites,
but they differ (`$^` in GNU, `$>` or `${.ALLSRC}` in BSD), which makes
writing portable makefiles tricky. Adding `${.ALLSRC}` as an alias for `$^`
makes portability easier.
> 
> Introduce these automatic variable aliases for easier readability and
portability:
> 
> 
> .IMPSRC = $<
> .PREFIX = $*
> .TARGET = $@
> .MEMBER = $%
> .ALLSRC = $^  # $> in BSD Make
> .OODATE = $?
> 
> 
> Pass --directory=src when applying patch with git.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60811>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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