#27 Per-target variables don't work

closed-fixed
nobody
None
5
2013-03-10
2012-02-18
dima
No

I'm seeing that per-target variables aren't being used. Is this a bug, or is
this how makepp works? Seems like it's really not "gnu make-compatible" if this
is by design. Sample makefile:

OBJS = f.o
$(OBJS): ALLCFLAGS += -fPIC
CFLAGS += $(ALLCFLAGS)

Sample session:

dima@fatty:/tmp$ touch f.c

dima@fatty:/tmp$ makepp -n -f Makefile.test f.o
makepp: Loading makefile `/tmp/Makefile.test'
gcc -g -Wall -c f.c -o f.o

dima@fatty:/tmp$ make -n -f Makefile.test f.o
cc -fPIC -c -o f.o f.c

Discussion

  • Daniel Pfeiffer

    Daniel Pfeiffer - 2012-02-26

    Handle builtin vars specially on extension

     
  • Daniel Pfeiffer

    Daniel Pfeiffer - 2012-02-26

    CFLAGS is a builtin variable, which are implemented in a special way. I have finally found an elegant way of handling them like gmake, as per the attached patch.

     
  • Daniel Pfeiffer

    Daniel Pfeiffer - 2012-02-26
    • status: open --> pending-fixed
     
  • Daniel Pfeiffer

    Daniel Pfeiffer - 2013-03-10
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks