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

 
 

bug #47409: API support for accessing build internals

Submitted by:  Brian Vandenberg <phantal>
Submitted on:  Mon Mar 14 17:33:25 2016  
 
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 4.1Operating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon Mar 14 17:59:35 2016, 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 Mar 14 17:33:25 2016, 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1