From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Date: Thu, 06 Mar 2003 21:39:36 +0000 Subject: Re: [Linux-ia64] Yet another SN update Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org On Wed, Mar 05, 2003 at 04:12:49PM -0800, Jesse Barnes wrote: Hi Jesse. >From a Makefile perspective it looks like you have made a really good job. A few comments - see below. Sam > +fakeprom := arch/ia64/sn/fakeprom > +fakeprom: > + $(Q)$(MAKE) $(build)=$(fakeprom) $@ Usually I use the rule to convert to full path in arch/$(ARCH)/Makefile The following is preferred assuming you generate file named fakeprom. > + $(Q)$(MAKE) $(build)=$(fakeprom) $(fakeprom)/$@ > diff -Naru linux-2.5.60-ia64-sn/arch/ia64/sn/fakeprom/Makefile work-sn2/arch/ia64/sn/fakeprom/Makefile > --- linux-2.5.60-ia64-sn/arch/ia64/sn/fakeprom/Makefile Mon Feb 10 10:38:53 2003 > +++ work-sn2/arch/ia64/sn/fakeprom/Makefile Mon Mar 3 13:30:10 2003 > > -obj-y=fpromasm.o main.o fw-emu.o fpmem.o klgraph_init.o > +targets-$(CONFIG_IA64_SGI_SN) := fakeprom Cannot (from the patch) see the purpose of this assignment. > -fprom: $(OBJ) > - $(LD) -static -Tfprom.lds -o fprom $(OBJ) $(LIB) > +OBJS := $(obj)/fpromasm.o $(obj)/main.o $(obj)/fw-emu.o $(obj)/fpmem.o \ > + $(obj)/klgraph_init.o > > -.S.o: > - $(CC) -D__ASSEMBLY__ $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $< > -.c.o: > - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -c -o $*.o $< > +fakeprom: $(obj)/fakeprom $(obj)/vmlinux.sym > + cp $(obj)/fakeprom $(obj)/fprom $(obj)/fprom is a target here. > + > +$(obj)/fakeprom: $(src)/fprom.lds $(OBJS) arch/ia64/lib/lib.a > + $(call if_changed,ld) You must add FORCE as prerequisite, otherwise it will not work as expected. All targets used must be listed in: EXTRA_TARGETS EXTRA_TARGETS := fprom fakeprom vmlinux.sym