From: aq Subject: Re: Makefile version. Date: Sat, 25 Jun 2005 20:08:45 -0500 Message-ID: <9cde8bff0506251808549c123d@mail.gmail.com> References: <17085.34823.894079.739424@kitch0.watson.ibm.com> <9d88d759c77007e379866a4bdc609915@cl.cam.ac.uk> <17085.40317.97560.935556@kitch0.watson.ibm.com> Reply-To: aq Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <17085.40317.97560.935556@kitch0.watson.ibm.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jimi Xenidis Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 6/25/05, Jimi Xenidis wrote: > >>>>> "KF" =3D=3D Keir Fraser writes: >=20 > KF> On 25 Jun 2005, at 17:36, Jimi Xenidis wrote: >=20 > >> Example: > >> foo.o: CFLAGS +=3D -DFOO_DEBUG >=20 > KF> Yeah, we allow those. I think they were added before 3.8x, otherwise= we > KF> wouldn't use them (we started using $(eval), which is a 3.8x feature= , > KF> and had complaints from 3.79 users). >=20 > Ok cool, that means I can remove my custom %.o:%.c commands and just > define CFLAGS for the target. > would also like to add an $(AFLAGS) to the %.o: %.S rule liek the > following diffs. >=20 > This allows me to further customize some assemble, paritularly to add > -Wa,-gdwarf2, as the followign diff shows: >=20 > --- /tmp/geta14981 2005-06-25 14:05:11.000000000 -0400 > +++ Rules.mk 2005-06-25 12:21:57.000000000 -0400 > @@ -80,5 +80,5 @@ > $(CC) $(CFLAGS) -c $< -o $@ >=20 > %.o: %.S $(HDRS) Makefile > - $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@ > + $(CC) $(CFLAGS) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@ >=20 you should always use diff from outside of xen root directory (so patch would be used with -p1 option). otherwise, it is impossible to know where to apply this patch (there are many Rules.mk file in the source tree) regards, aq