patch-2.4.25 linux-2.4.25/arch/ia64/tools/Makefile
Next file: linux-2.4.25/arch/ia64/tools/print_offsets.c
Previous file: linux-2.4.25/arch/ia64/mm/tlb.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
2004-02-18 05:36:30.000000000 -0800
- Orig file:
linux-2.4.24/arch/ia64/tools/Makefile
- Orig date:
2002-11-28 15:53:09.000000000 -0800
diff -urN linux-2.4.24/arch/ia64/tools/Makefile linux-2.4.25/arch/ia64/tools/Makefile
@@ -33,7 +33,7 @@
comma := ,
-print_offsets: print_offsets.c FORCE_RECOMPILE
+print_offsets: emptyoffsets print_offsets.c FORCE_RECOMPILE
$(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) print_offsets.c -o $@
FORCE_RECOMPILE:
@@ -43,9 +43,20 @@
offsets.h: print_offsets.s
$(AWK) -f print_offsets.awk $^ > $@
-print_offsets.s: print_offsets.c
+print_offsets.s: emptyoffsets print_offsets.c
$(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -S print_offsets.c -o $@
endif
+#
+# The TARGET offsets.h is included by ptrace.h, which is included by
+# print_offsets.c, so can't compile print_offsets.c to create offsets.h
+# until we already have offsets.h. Break the chicken-and-egg cycle by
+# creating a dummy offsets.h with sufficient define's to bootstrap
+# the first compilation of print_offsets.c.
+#
+
+emptyoffsets:
+ test -f ${TARGET} || echo '#define IA64_TASK_THREAD_OFFSET 0' > ${TARGET}
+
.PHONY: all modules modules_install
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)