bugmake - Bugs: bug #39308, .SECONDEXPANSION

 
 

bug #39308: .SECONDEXPANSION

Submitter:  praveen <praveenb>
Submitted:  Fri 21 Jun 2013 04:01:44 AM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 21 Jun 2013 04:10:52 AM UTC, comment #1: 

The mailing lists are much better places to ask for help than the bug tracker.

GNU make, like all versions of make, will only build the first target in the makefile by default.  Here the first target is "main", so that's what make builds.

If you want it to build both "main" and "lib" you'll have to either list them on the command line ("make main lib") or else add a target before the other targets that depends on them: the traditional target name for this is "all" but you can use whatever you like:


all: main lib
main lib: $$(patsubst %.c,%.o,$$($$@_OBJS))
        @echo $($@_OBJS)


Paul D. Smith <psmith>
Group administrator
Fri 21 Jun 2013 04:01:44 AM UTC, original submission:  

i am trying examples on given 3.81 document but what i go through the theory the answer is different please help me

in the .SECONDEXPANSION example the main_OBJS are printing but
lib_OBJS are not printing why

main_OBJS := main.c try.c test.c
lib_OBJS := lib.c api.c

.SECONDEXPANSION:
main lib : $$(patsubst %.c,%.o,$$($$@_OBJS))
@echo $($@_OBJS)

praveen <praveenb>

 

(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 psmith (Posted a comment)
  • -email is unavailable- added by praveenb (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-21 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code