bugmake - Bugs: bug #47409, API support for accessing build...

 
 

bug #47409: API support for accessing build internals

Submitter:  Brian Vandenberg <phantal>
Submitted:  Mon 14 Mar 2016 05:33:25 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.1 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 14 Mar 2016 05:59:35 PM UTC, comment #1: 

w/regard to build introspection: this could be useful for doing something like the following.  Admittedly it's a contrived example, but I've had ideas along these lines (but less contrived) that it would help with:

TARGETS := ... some stuff here ...

# ...
# possibly complicated logic for
# setting dependencies for ${TARGETS}
# ...

OBJS    := $(get_children ${TARGETS})
# more things may depend on those objects
# than was in the original list
TARGETS := $(get_parents ${OBJS})

${OBJS}    : private CCFLAGS += asdf
# anything linking these objects
# needs some special flag
${TARGETS} : private LDFLAGS += fdsa


Brian Vandenberg <phantal>
Mon 14 Mar 2016 05:33:25 PM UTC, original submission:  

Some things I'd like to see added (some of which I mentioned in another issue):


read-only exports for select global variables (eg, current makefile name / current line number)


A C function for checking whether a variable exists, possibly returning a struct describing it (export/override set?, flavor, origin, pointer-to-pointer for the variable in case they want to re-allocate it)


C functions for doing introspection:

  • targets that depend on target X
  • targets needed by target X
  • look up target-specific variable values



Make existing macro functions non-static and exported in gnumake.h:

my_macro( /*...*/ ) {
  /* ... */
  return gmk_strip( result );
}


Add a way to make temporary variables like what $(foreach) does.

Brian Vandenberg <phantal>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phantal (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code