[Top][All Lists]

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

[bug #64002] Improve MAKEFILE_LIST with include

From: anonymous
Subject: [bug #64002] Improve MAKEFILE_LIST with include
Date: Wed, 5 Apr 2023 13:00:17 -0400 (EDT)


                 Summary: Improve MAKEFILE_LIST with include
                   Group: make
               Submitter: None
               Submitted: Wed 05 Apr 2023 05:00:15 PM UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: Any
           Fixed Release: None
           Triage Status: None


Follow-up Comments:

Date: Wed 05 Apr 2023 05:00:15 PM UTC By: Anonymous
The "include <filepathname>" statement is a way to extend make and re-use
existing code and make less copy paste errors.

Current state:
The MAKEFILE_LIST can be used to detect the name of the current Makefile, e.g.
to allow creation of iterative tests for the Makefiles themselves.
e.g. sh invocation:
for file in (makefiles/*); do make -f $file test; done

However as suggested here
there is not consise and reliable way to get the name of the current Makefile

Add one or two automatic variables that allow the running make to determine
which file is being processed.

MAKEFILE_LIST would behave unchanged

CURRENT_MAKEFILE Would be the filename filename of the relative to CURDIR e.g.
work/build/Makefile  It would bethe same or similar to:

CURRENT_SUBMAKE Would be what file(s) the current *line* came from Makefile
Makefile.inc.1 Makefile.inc.1

$(line_num N)
Perhaps a new function, something like $(line_num N) which would expand to the
line where that first expansion occured less N

e.g. (excuse if syntax is not 100%)
warn = $(info Value of $1 at $(line_num $2) is not valid)

DEBUG = $(intcmp $1,$(MAX_DBG),,$(call warn,DBG_LEL,2))$(intcmp
$1,$(CURRENT_DEBUG_LEVEL),$(info $2))
ifneq ($(filter $(DBG_LVL), 0 1 2),)


Reply to this item at:


Message sent via Savannah

reply via email to

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