svn commit: trunk/busybox

aldot at busybox.net aldot at busybox.net
Mon Mar 6 14:19:18 UTC 2006


Author: aldot
Date: 2006-03-06 06:19:15 -0800 (Mon, 06 Mar 2006)
New Revision: 14454

Log:
- work around missing features and bugs in make-3.79.1:
- no order-only prerequisites; incomplete workaround (see comment in diff)
- no internal variable MAKEFILE_LIST; workaround
- define bar\nfoo:=<long-list>  doesn't work; workaround
also:
- reinstate clean, distclean as noconfig_target.
- unconditionally clean libbusybox.so*


Modified:
   trunk/busybox/Makefile


Changeset:
Modified: trunk/busybox/Makefile
===================================================================
--- trunk/busybox/Makefile	2006-03-05 18:04:23 UTC (rev 14453)
+++ trunk/busybox/Makefile	2006-03-06 14:19:15 UTC (rev 14454)
@@ -10,8 +10,15 @@
 #--------------------------------------------------------------
 noconfig_targets := menuconfig config oldconfig randconfig \
 	defconfig allyesconfig allnoconfig allbareconfig \
+	clean distclean \
 	release tags
 
+# make-3.79.1 didn't support MAKEFILE_LIST
+# for building out-of-tree, users of make-3.79 still have to pass top_srcdir=
+# to make: make -f /srcs/busybox/Makefile top_srcdir=/srcs/busybox
+ifndef MAKEFILE_LIST
+MAKEFILE_LIST=.
+endif
 # the toplevel sourcedir
 ifndef top_srcdir
 top_srcdir:=$(shell cd $(dir $(firstword $(MAKEFILE_LIST))) && pwd)
@@ -59,6 +66,13 @@
 #######################################################################
 # Try to workaround bugs in make
 
+# make-3.79.1 didn't understand order-only prerequisites ('|').
+# Just treat them as normal prerequisites. Note that this will lead to
+# spurious rebuilds.
+ifeq ($(MAKE_VERSION),3.79.1)
+|: ;
+endif
+
 # Workaround for bugs in make-3.80
 # eval is broken if it is in a conditional
 
@@ -86,7 +100,6 @@
 
 #######################################################################
 
-
 -include $(top_srcdir)/Rules.mak
 
 # Handle building out of tree
@@ -251,20 +264,21 @@
 # Then we need the dependencies for ..._OBJ
 define dir_pattern.o
 ifeq ($(os),.os)
-# write patterns for both .os and .o
 $(if $($(1)_OBJ.os),$($(1)_OBJ.os:.os=.o): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
 endif
 $(if $($(1)_OBJ$(os)),$($(1)_OBJ$(os)): $(top_builddir)/$(2)/%$(os): $(top_srcdir)/$(2)/%.c)
 $(if $($(1)_OBJ),$($(1)_OBJ): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
+endef
 
-lib-obj-y+=$($(1)_OBJ) $($(1)_OBJ.o) $($(1)_OBJ.os)
-lib-mobj-y+=$($(1)_MOBJ.o) $($(1)_MOBJ.os)
-bin-obj-y+=$($(1)_OBJ:.os=.o) $($(1)_OBJ.o:.os=.o) $($(1)_OBJ.os:.os=.o)
-bin-mobj-y+=$($(1)_MOBJ.o:.osm=.om) $($(1)_MOBJ.os:.osm=.om)
-endef
 # The actual directory patterns for .o*
 $(foreach d,$(DIRS),$(eval $(call dir_pattern.o,$(subst /,_,$(d)),$(d))))
 
+define file_lists
+$($(1)$(2)) $($(1)$(2).o) $($(1)$(2).os)
+endef
+bin-obj-y:=$(subst .os,.o,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_OBJ)))
+bin-mobj-y:=$(subst .osm,.om,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_MOBJ)))
+
 ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
 # Finally pull in the dependencies (headers and other includes) of the
 # individual object files
@@ -481,7 +495,7 @@
 	    docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \
 	    docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
 	    docs/busybox.net/BusyBox.html busybox.links \
-	    $(DO_INSTALL_LIBS) $(LIBBUSYBOX_SONAME) \
+	    libbusybox.so* \
 	    .config.old busybox busybox_unstripped
 	- rm -r -f _install testsuite/links
 	- find . -name .\*.flags -exec rm -f {} \;




More information about the busybox-cvs mailing list