Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2015 19:01:30 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Support for out-of-tree build

On Wed, Nov 11, 2015 at 06:08:48PM -0500, Rich Felker wrote:
> > -%.o: $(ARCH)$(ASMSUBARCH)/%.sub
> > +$(OBJS_SUB): %.o:
> >  	$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $(dir $<)$(shell cat $<)
> >  
> > -%.o: $(ARCH)/%.s
> > +$(OBJS_S): %.o:
> >  	$(AS_CMD) $(CFLAGS_ALL_STATIC)
> >  
> > -%.o: %.c $(GENH) $(IMPH)
> > +$(OBJS_C): %.o: $(srcdir)/%.c $(GENH) $(IMPH)
> >  	$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
> >  
> > -%.lo: $(ARCH)$(ASMSUBARCH)/%.sub
> > +$(LOBJS_SUB): %.lo:
> >  	$(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $(dir $<)$(shell cat $<)
> >  
> > -%.lo: $(ARCH)/%.s
> > +$(LOBJS_S): %.lo:
> >  	$(AS_CMD) $(CFLAGS_ALL_SHARED)
> >  
> > -%.lo: %.c $(GENH) $(IMPH)
> > +$(LOBJS_C): %.lo: $(srcdir)/%.c $(GENH) $(IMPH)
> >  	$(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $<
> 
> I don't understand these rules with two :'s. I assume it's some trick
> I don't yet know. But in the case of the %.s ones, the new rules have
> no %.s in them... this looks wrong, no?

I found the documentation here:

https://www.gnu.org/software/make/manual/html_node/Static-Pattern.html

I also checked that the feature has been around at least back to GNU
Make 3.81.

Anyway, it looks potentially very nice/useful, but with the above
apparent-error, I'm not sure how you express the rules we need. Note
that we do need to do something new about the .sub files, so I'm not
opposed to making some structural changes to the source tree to go
along with build system overhaul. I'd just like to keep the layout
reasonable and the semantics fully represented by source tree layout
rather than by makefile logic.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.