Re: [Linux-ia64] Yet another SN update

From: Sam Ravnborg <sam_at_ravnborg.org>
Date: 2003-03-07 08:39:36
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
Received on Thu Mar 06 13:39:46 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:12 EST