revision 14457: make 3.79 ok, 3.80 unhappy
Bernhard Fischer
rep.nop at aon.at
Tue Mar 7 10:14:36 PST 2006
On Tue, Mar 07, 2006 at 11:40:50AM -0500, Rob Landley wrote:
>On Tuesday 07 March 2006 10:51 am, Jason Schoon wrote:
>> Bernhard is taking care of it from the sounds of it, but I would throw in
>> my $.02 that 3.80 absolutely has to work. It is currently the latest
>> released version of make, and is over 3 years old. So, anyone not willing
>> to use a beta or find appropriate patches is very likely to be using it.
>
>Agreed.
nod.
The attached patch does revert using several features which didn't work
with older (than 3.81-rc1) versions of make.
It was tersely tested with:
- make-3.80 vanilly
- make-3.80 from ubuntu
- make-3.79.1 redhat9 flavour
I plan to also test with more current versions before sending the
"final" version of that repair.
If this patch does break right now for anybody with make-3.79.1 or
make-3.80, then please let me know, TIA.
>
>I grabbed last night's snapshot and fed it into RH9. I had to disable
>e2fsprogs to get it to build (couldn't find blkid, I think. I'm assuming
I also added a workaround to please make-3.79.1 from redhat9, fwiw. RH9
ain't supported by redhat anymore... whatever ;)
>this is related to the "fixme"). But everything else seems to have built.
>
>(And it's 1086060 bytes _without_ e2fsprogs. Eeek! We are definitely taking
>advantage of the new compiler...)
Indeed. :)
-------------- next part --------------
diff -X excl -rdup busybox.oorig/Makefile busybox/Makefile
--- busybox.oorig/Makefile 2006-03-06 16:49:55.000000000 +0100
+++ busybox/Makefile 2006-03-07 19:01:26.000000000 +0100
@@ -13,15 +13,9 @@ noconfig_targets := menuconfig config ol
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)
+top_srcdir:=$(CURDIR)
endif
# toplevel directory of the object-tree
ifndef top_builddir
@@ -63,44 +57,24 @@ else
PACKAGE_OUTPUTDIR := $(top_builddir)
endif
-#######################################################################
-# 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
-
-#$ cat 3.80-eval-in-cond.mak
-#all:: ; @echo it
-#define Y
-# all:: ; @echo worked
-#endef
-#ifdef BAR
-#$(eval $(Y))
-#endif
-#$ make -f 3.80-eval-in-cond.mak
-#it
-#$ make -f 3.80-eval-in-cond.mak BAR=set
-#3.80-eval-in-cond.mak:5: *** missing `endif'. Stop.
-
-# This was fixed in December 2003.
define check_gcc
$(eval $(1)+=$(if $(2),$(if $(shell $(CC) $(2) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 && echo y),$(2),$(if $(3),$(3))),$(if $(3),$(3))))
endef
-
define check_ld
$(eval $(1)+=$(if $(2),$(if $(shell $(LD) $(2) -o /dev/null -b binary /dev/null > /dev/null 2>&1 && echo y),$(shell echo \-Wl,$(2)),$(if $(3),$(3))),$(if $(3),$(3))))
endef
#######################################################################
+# Try to workaround bugs and missing features 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
+#######################################################################
--include $(top_srcdir)/Rules.mak
# Handle building out of tree
ifneq ($(top_builddir),$(top_srcdir))
@@ -179,6 +153,8 @@ help:
@echo ' 2 also print when make enters a directory'
@echo ' 3 also verbosely print shell invocations'
+-include $(top_srcdir)/Rules.mak
+
ifneq ($(strip $(HAVE_DOT_CONFIG)),y)
# Default target if none was requested explicitly
all: defconfig menuconfig ;
@@ -252,33 +228,8 @@ ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
-# convert $(DIRS) to upper case. Use sed instead of tr since we're already
-# depending on it.
-DIRS_UPPER:=$(shell echo $(DIRS) | $(SED) 'h;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/')
-
-# First populate the variables ..._OBJ-y et al
-$(foreach d,$(DIRS_UPPER),$(eval $(notdir $(d))-y:=))
-
include $(patsubst %,%/Makefile.in,$(SRC_DIRS))
-# Then we need the dependencies for ..._OBJ
-define dir_pattern.o
-ifeq ($(os),.os)
-$(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
-
-# 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
@@ -294,9 +245,7 @@ all: busybox busybox.links doc ;
# IMA compiles all sources at once (aka IPO aka IPA etc.)
ifeq ($(strip $(CONFIG_BUILD_AT_ONCE)),y)
-# We are not building .o
-bin-obj-y:=
-bin-mobj-y:=
+libraries-y:=
# Which parts of the internal libs are requested?
# Per default we only want what was actually selected.
# -a denotes all while -y denotes the selected ones.
@@ -312,30 +261,17 @@ APPLETS_DEFINE:=$(APPLETS_DEFINE-y)
else # CONFIG_BUILD_AT_ONCE
# no --combine, build archives out of the individual .o
# This was the old way the binary was built.
-libbusybox-obj:=$(archival_libunarchive_OBJ$(os)) \
- $(networking_libiproute_OBJ$(os)) \
- $(libpwdgrp_MOBJ$(os)) \
- $(coreutils_libcoreutils_OBJ$(os)) \
- $(libbb_OBJ$(os)) $(libbb_MOBJ$(os))
-
+libbusybox-obj:=archival/libunarchive/libunarchive.a \
+ networking/libiproute/libiproute.a \
+ libpwdgrp/libpwdgrp.a coreutils/libcoreutils/libcoreutils.a \
+ libbb/libbb.a
+libbusybox-obj:=$(patsubst %,$(top_builddir)/%,$(libbusybox-obj))
ifeq ($(strip $(CONFIG_FEATURE_SHARED_BUSYBOX)),y)
-# linking against libbusybox, so don't build the .o already contained in the .so
-bin-obj-y:=$(filter-out $(libbusybox-obj) $(libbusybox-obj:.os=.o),$(bin-obj-y))
-bin-mobj-y:=$(filter-out $(libbusybox-obj) $(libbusybox-obj:.osm=.om),$(bin-mobj-y))
+# linking against libbusybox, so don't build the .a already contained in the .so
+libraries-y:=$(filter-out $(libbusybox-obj),$(libraries-y))
endif # CONFIG_FEATURE_SHARED_BUSYBOX
-endif # CONFIG_BUILD_AT_ONCE
-
-# build an .a to keep .hash et al small
-ifneq ($(bin-obj-y)$(bin-mobj-y),)
- applets.a:=$(bin-obj-y) $(bin-mobj-y)
-endif
-ifdef applets.a
-applets.a: $(applets.a)
- $(Q)-rm -f $(@)
- $(do_ar)
-bin-obj.a=applets.a
-endif
+endif # CONFIG_BUILD_AT_ONCE
ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
LD_LIBBUSYBOX:=libbusybox.so
@@ -355,6 +291,8 @@ endif # !CONFIG_FEATURE_SHARED_BUSYBOX
$(LIBBUSYBOX_SONAME): $(LIBRARY_SRC)
else # CONFIG_BUILD_AT_ONCE
$(LIBBUSYBOX_SONAME): $(libbusybox-obj)
+AR_INTRO:=-Wl,--whole-archive
+AR_EXTRO:=-Wl,--no-whole-archive
endif # CONFIG_BUILD_AT_ONCE
@@ -372,7 +310,7 @@ endif
-Wl,-z,combreloc $(LIB_LDFLAGS) \
-o $(@) \
-Wl,--start-group \
- $(LIBRARY_DEFINE) $(^) \
+ $(LIBRARY_DEFINE) $(AR_INTRO) $(^) $(AR_EXTRO) \
-Wl,--end-group
@rm -f $(DO_INSTALL_LIBS)
@for i in $(DO_INSTALL_LIBS); do ln -s $(@) $$i ; done
@@ -380,14 +318,14 @@ endif
endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
-busybox_unstripped: $(top_builddir)/.depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(APPLET_SRC) $(bin-obj.a)
+busybox_unstripped: $(top_builddir)/.depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(APPLET_SRC) $(libraries-y)
$(do_link) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) \
$(foreach f,$(^:.o=.c),$(CFLAGS-$(notdir $(patsubst %/$,%,$(dir $(f))))-$(notdir $(f)))) \
$(CFLAGS-$(@)) \
-o $@ -Wl,--start-group \
$(APPLETS_DEFINE) $(APPLET_SRC) \
$(BUSYBOX_DEFINE) $(BUSYBOX_SRC) \
- $(bin-obj.a) \
+ $(libraries-y) \
$(LDBUSYBOX) $(LIBRARIES) \
-Wl,--end-group
diff -X excl -rdup busybox.oorig/Rules.mak busybox/Rules.mak
--- busybox.oorig/Rules.mak 2006-03-06 16:49:55.000000000 +0100
+++ busybox/Rules.mak 2006-03-07 19:01:48.000000000 +0100
@@ -94,7 +94,7 @@ CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA
WARNINGS=-Wall -Wstrict-prototypes -Wshadow
CFLAGS+=-I$(top_builddir)/include -I$(top_srcdir)/include
-ARFLAGS=cruP
+ARFLAGS=cru
@@ -379,12 +379,11 @@ ifdef rules-mak-rules
.SUFFIXES: .c .S .o .os .om .osm .oS .so .a .s .i .E
# generic rules
-%.o: %.c ; $(compile.c)
-%.os: %.c ; $(compile.c) $(CFLAGS_PIC)
%.o: ; $(compile.c)
%.os: ; $(compile.c) $(CFLAGS_PIC)
%.om: ; $(compile.m)
%.osm: ; $(compile.m) $(CFLAGS_PIC)
+%.a: ; $(do_ar)
endif # rules-mak-rules
diff -X excl -rdup busybox.oorig/applets/Makefile.in busybox/applets/Makefile.in
--- busybox.oorig/applets/Makefile.in 2006-03-02 09:28:01.000000000 +0100
+++ busybox/applets/Makefile.in 2006-03-07 15:53:19.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/applets
-objdir=$(top_builddir)/applets
+srcdir:=$(top_srcdir)/applets
+objdir:=$(top_builddir)/applets
APPLETS_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c)
@@ -14,3 +14,7 @@ APPLET_SRC-a+=$(APPLETS_SRC)
applets_OBJ:=$(patsubst $(srcdir)/%.c,$(objdir)/%.o,$(APPLETS_SRC))
+$(applets_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/applets.a: $(applets_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/applets.a
+
diff -X excl -rdup busybox.oorig/archival/Makefile.in busybox/archival/Makefile.in
--- busybox.oorig/archival/Makefile.in 2006-03-02 09:27:51.000000000 +0100
+++ busybox/archival/Makefile.in 2006-03-07 15:57:38.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/archival
-objdir=$(top_builddir)/archival
+srcdir:=$(top_srcdir)/archival
+objdir:=$(top_builddir)/archival
ARCHIVAL-$(CONFIG_AR) += ar.o
ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o
@@ -28,3 +28,7 @@ APPLET_SRC-a+=$(ARCHIVAL_SRC-a)
archival_OBJ:= $(patsubst %,$(objdir)/%,$(ARCHIVAL-y))
+$(archival_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/archival.a: $(archival_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/archival.a
+
diff -X excl -rdup busybox.oorig/archival/libunarchive/Makefile.in busybox/archival/libunarchive/Makefile.in
--- busybox.oorig/archival/libunarchive/Makefile.in 2006-03-02 09:27:47.000000000 +0100
+++ busybox/archival/libunarchive/Makefile.in 2006-03-07 15:57:25.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/archival/libunarchive
-objdir=$(top_builddir)/archival/libunarchive
+srcdir:=$(top_srcdir)/archival/libunarchive
+objdir:=$(top_builddir)/archival/libunarchive
LIBUNARCHIVE-y:= \
\
@@ -71,3 +71,7 @@ LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
archival_libunarchive_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBUNARCHIVE-y))
+$(archival_libunarchive_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c
+$(objdir)/libunarchive.a: $(archival_libunarchive_OBJ$(os))
+libraries-y:=$(libraries-y) $(objdir)/libunarchive.a
+
diff -X excl -rdup busybox.oorig/console-tools/Makefile.in busybox/console-tools/Makefile.in
--- busybox.oorig/console-tools/Makefile.in 2006-03-02 09:27:53.000000000 +0100
+++ busybox/console-tools/Makefile.in 2006-03-07 15:58:07.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/console-tools
-objdir=$(top_builddir)/console-tools
+srcdir:=$(top_srcdir)/console-tools
+objdir:=$(top_builddir)/console-tools
CONSOLETOOLS-$(CONFIG_CHVT) += chvt.o
CONSOLETOOLS-$(CONFIG_CLEAR) += clear.o
@@ -26,3 +26,7 @@ APPLET_SRC-a+=$(CONSOLETOOLS_SRC-a)
console-tools_OBJ:= $(patsubst %,$(objdir)/%,$(CONSOLETOOLS-y))
+$(console-tools_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/console-tools.a: $(console-tools_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/console-tools.a
+
diff -X excl -rdup busybox.oorig/coreutils/Makefile.in busybox/coreutils/Makefile.in
--- busybox.oorig/coreutils/Makefile.in 2006-03-06 16:49:54.000000000 +0100
+++ busybox/coreutils/Makefile.in 2006-03-07 15:58:53.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/coreutils
-objdir=$(top_builddir)/coreutils
+srcdir:=$(top_srcdir)/coreutils
+objdir:=$(top_builddir)/coreutils
COREUTILS-$(CONFIG_BASENAME) += basename.o
COREUTILS-$(CONFIG_CAL) += cal.o
@@ -86,3 +86,7 @@ APPLET_SRC-a+=$(COREUTILS_SRC-a)
coreutils_OBJ:= $(patsubst %,$(objdir)/%,$(COREUTILS-y))
+$(coreutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/coreutils.a: $(coreutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/coreutils.a
+
diff -X excl -rdup busybox.oorig/coreutils/libcoreutils/Makefile.in busybox/coreutils/libcoreutils/Makefile.in
--- busybox.oorig/coreutils/libcoreutils/Makefile.in 2006-03-02 09:27:56.000000000 +0100
+++ busybox/coreutils/libcoreutils/Makefile.in 2006-03-07 15:58:44.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/coreutils/libcoreutils
-objdir=$(top_builddir)/coreutils/libcoreutils
+srcdir:=$(top_srcdir)/coreutils/libcoreutils
+objdir:=$(top_builddir)/coreutils/libcoreutils
LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod
LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod
@@ -21,3 +21,8 @@ LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
coreutils_libcoreutils_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBCOREUTILS-y))
+
+$(coreutils_libcoreutils_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c
+$(objdir)/libcoreutils.a: $(coreutils_libcoreutils_OBJ$(os))
+libraries-y:=$(libraries-y) $(objdir)/libcoreutils.a
+
diff -X excl -rdup busybox.oorig/debianutils/Makefile.in busybox/debianutils/Makefile.in
--- busybox.oorig/debianutils/Makefile.in 2006-03-02 09:27:54.000000000 +0100
+++ busybox/debianutils/Makefile.in 2006-03-07 15:58:17.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/debianutils
-objdir=$(top_builddir)/debianutils
+srcdir:=$(top_srcdir)/debianutils
+objdir:=$(top_builddir)/debianutils
DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o
DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
@@ -21,3 +21,7 @@ APPLET_SRC-a+=$(DEBIANUTILS_SRC-a)
debianutils_OBJ:= $(patsubst %,$(objdir)/%,$(DEBIANUTILS-y))
+$(debianutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/debianutils.a: $(debianutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/debianutils.a
+
diff -X excl -rdup busybox.oorig/e2fsprogs/Makefile.in busybox/e2fsprogs/Makefile.in
--- busybox.oorig/e2fsprogs/Makefile.in 2006-03-06 16:49:54.000000000 +0100
+++ busybox/e2fsprogs/Makefile.in 2006-03-07 20:37:35.000000000 +0100
@@ -45,14 +45,7 @@ $(patsubst %,$(objdir)/%, blkid e2fsck e
# may have object files created after the timestamp of the directory was
# updated which would lead to spurious rebuilds (as some of the dentries
# may be older than the dir itself).
-ifneq ($(MAKE_VERSION),3.81beta4)
-# /top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/dir/file.c
-$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c |$(objdir)/blkid
-$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c|$(objdir)/e2fsck
-$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c |$(objdir)/e2p
-$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c|$(objdir)/ext2fs
-$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c |$(objdir)/uuid
-else
+ifeq ($(MAKE_VERSION),3.81beta4)
# alleged bug in 3.81beta4. Stripping dir from dir/files.c
# /top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/file.c
$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/%.c |$(objdir)/blkid
@@ -60,8 +53,40 @@ $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS))
$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/%.c |$(objdir)/e2p
$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/%.c|$(objdir)/ext2fs
$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/%.c |$(objdir)/uuid
+
+e2fsprogs-rules-seen:=1
endif
+ifeq ($(MAKE_VERSION),3.79.1)
+# no order-only prerequesites
+$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c #|$(objdir)/blkid
+$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c#|$(objdir)/e2fsck
+$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c #|$(objdir)/e2p
+$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c#|$(objdir)/ext2fs
+$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c #|$(objdir)/uuid
+$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid
+$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck
+$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p
+$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs
+$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid
+$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid
+$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck
+$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p
+$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs
+$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid
+
+e2fsprogs-rules-seen:=1
+endif
+
+ifndef e2fsprogs-rules-seen
+$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c |$(objdir)/blkid
+$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c|$(objdir)/e2fsck
+$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c |$(objdir)/e2p
+$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c|$(objdir)/ext2fs
+$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c |$(objdir)/uuid
+endif
+
+
E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(UUID_OBJS)
@@ -93,3 +118,7 @@ APPLETS_DEFINE-a+=$(CFLAGS-e2fsprogs) -I
e2fsprogs_OBJ:= $(patsubst %,$(objdir)/%,$(E2FSPROGS-y))
+$(e2fsprogs_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/e2fsprogs.a: $(e2fsprogs_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/e2fsprogs.a
+
diff -X excl -rdup busybox.oorig/editors/Makefile.in busybox/editors/Makefile.in
--- busybox.oorig/editors/Makefile.in 2006-03-02 09:28:01.000000000 +0100
+++ busybox/editors/Makefile.in 2006-03-07 16:06:39.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/editors
-objdir=$(top_builddir)/editors
+srcdir:=$(top_srcdir)/editors
+objdir:=$(top_builddir)/editors
EDITORS-$(CONFIG_AWK) += awk.o
EDITORS-$(CONFIG_PATCH) += patch.o
@@ -26,3 +26,7 @@ APPLET_SRC-a+=$(EDITOR_SRC-a)
editors_OBJ:= $(patsubst %,$(objdir)/%,$(EDITORS-y))
+$(editors_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/editors.a: $(editors_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/editors.a
+
diff -X excl -rdup busybox.oorig/findutils/Makefile.in busybox/findutils/Makefile.in
--- busybox.oorig/findutils/Makefile.in 2006-03-02 09:28:00.000000000 +0100
+++ busybox/findutils/Makefile.in 2006-03-07 16:06:07.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/findutils
-objdir=$(top_builddir)/findutils
+srcdir:=$(top_srcdir)/findutils
+objdir:=$(top_builddir)/findutils
FINDUTILS-$(CONFIG_FIND) += find.o
FINDUTILS-$(CONFIG_GREP) += grep.o
@@ -18,3 +18,7 @@ APPLET_SRC-a+=$(FINDUTILS_SRC-a)
findutils_OBJ:= $(patsubst %,$(objdir)/%,$(FINDUTILS-y))
+$(findutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/findutils.a: $(findutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/findutils.a
+
diff -X excl -rdup busybox.oorig/init/Makefile.in busybox/init/Makefile.in
--- busybox.oorig/init/Makefile.in 2006-03-02 09:28:00.000000000 +0100
+++ busybox/init/Makefile.in 2006-03-07 16:06:14.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/init
-objdir=$(top_builddir)/init
+srcdir:=$(top_srcdir)/init
+objdir:=$(top_builddir)/init
INIT-$(CONFIG_HALT) += halt.o
INIT-$(CONFIG_INIT) += init.o
@@ -30,3 +30,7 @@ APPLET_SRC-a+=$(INIT_SRC-a)
init_OBJ:= $(patsubst %,$(objdir)/%,$(INIT-y))
+$(init_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/init.a: $(init_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/init.a
+
diff -X excl -rdup busybox.oorig/libbb/Makefile.in busybox/libbb/Makefile.in
--- busybox.oorig/libbb/Makefile.in 2006-03-06 16:49:54.000000000 +0100
+++ busybox/libbb/Makefile.in 2006-03-07 17:37:22.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/libbb
-objdir=$(top_builddir)/libbb
+srcdir:=$(top_srcdir)/libbb
+objdir:=$(top_builddir)/libbb
LIBBB-n:=
LIBBB-y:= \
@@ -146,3 +146,8 @@ $(LIBBB_MOBJ5:.osm=.om): $(LIBBB_MSRC5)
$(LIBBB_MOBJ6:.osm=.om): $(LIBBB_MSRC6)
endif
+$(libbb_OBJ.os): $(objdir)/%.os: $(srcdir)/%.c
+$(libbb_OBJ.o): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/libbb.a: $(libbb_OBJ$(os)) $(libbb_MOBJ$(os))
+libraries-y:=$(libraries-y) $(objdir)/libbb.a
+
diff -X excl -rdup busybox.oorig/libpwdgrp/Makefile.in busybox/libpwdgrp/Makefile.in
--- busybox.oorig/libpwdgrp/Makefile.in 2006-03-02 09:28:00.000000000 +0100
+++ busybox/libpwdgrp/Makefile.in 2006-03-07 16:05:57.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/libpwdgrp
-objdir=$(top_builddir)/libpwdgrp
+srcdir:=$(top_srcdir)/libpwdgrp
+objdir:=$(top_builddir)/libpwdgrp
LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
LIBPWDGRP_M0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r fgetgrent_r \
@@ -43,3 +43,7 @@ ifeq ($(om),.osm)
$(LIBPWDGRP_MOBJ0:.osm=.om): $(LIBPWDGRP_MSRC0)
$(LIBPWDGRP_MOBJ1:.osm=.om): $(LIBPWDGRP_MSRC1)
endif
+
+$(objdir)/libpwdgrp.a: $(libpwdgrp_MOBJ$(os))
+libraries-y:=$(libraries-y) $(objdir)/libpwdgrp.a
+
diff -X excl -rdup busybox.oorig/loginutils/Makefile.in busybox/loginutils/Makefile.in
--- busybox.oorig/loginutils/Makefile.in 2006-03-06 16:49:55.000000000 +0100
+++ busybox/loginutils/Makefile.in 2006-03-07 16:05:45.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/loginutils
-objdir=$(top_builddir)/loginutils
+srcdir:=$(top_srcdir)/loginutils
+objdir:=$(top_builddir)/loginutils
LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o
LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o
@@ -36,3 +36,7 @@ endif
loginutils_OBJ:= $(patsubst %,$(objdir)/%,$(LOGINUTILS-y))
+$(loginutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/loginutils.a: $(loginutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/loginutils.a
+
diff -X excl -rdup busybox.oorig/miscutils/Makefile.in busybox/miscutils/Makefile.in
--- busybox.oorig/miscutils/Makefile.in 2006-03-06 16:49:55.000000000 +0100
+++ busybox/miscutils/Makefile.in 2006-03-07 16:05:36.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/miscutils
-objdir=$(top_builddir)/miscutils
+srcdir:=$(top_srcdir)/miscutils
+objdir:=$(top_builddir)/miscutils
MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
MISCUTILS-$(CONFIG_CROND) += crond.o
@@ -40,3 +40,7 @@ APPLET_SRC-a+=$(MISCUTILS_SRC-a)
miscutils_OBJ:= $(patsubst %,$(objdir)/%,$(MISCUTILS-y))
+$(miscutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/miscutils.a: $(miscutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/miscutils.a
+
diff -X excl -rdup busybox.oorig/modutils/Makefile.in busybox/modutils/Makefile.in
--- busybox.oorig/modutils/Makefile.in 2006-03-02 09:27:52.000000000 +0100
+++ busybox/modutils/Makefile.in 2006-03-07 15:57:58.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/modutils
-objdir=$(top_builddir)/modutils
+srcdir:=$(top_srcdir)/modutils
+objdir:=$(top_builddir)/modutils
MODUTILS-$(CONFIG_INSMOD) += insmod.o
MODUTILS-$(CONFIG_LSMOD) += lsmod.o
@@ -19,3 +19,7 @@ APPLET_SRC-a+=$(MODUTILS_SRC-a)
modutils_OBJ:= $(patsubst %,$(objdir)/%,$(MODUTILS-y))
+$(modutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/modutils.a: $(modutils_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/modutils.a
+
diff -X excl -rdup busybox.oorig/networking/Makefile.in busybox/networking/Makefile.in
--- busybox.oorig/networking/Makefile.in 2006-03-06 16:49:53.000000000 +0100
+++ busybox/networking/Makefile.in 2006-03-07 15:55:17.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/networking
-objdir=$(top_builddir)/networking
+srcdir:=$(top_srcdir)/networking
+objdir:=$(top_builddir)/networking
NETWORKING-$(CONFIG_ARPING) += arping.o
NETWORKING-$(CONFIG_DNSD) += dnsd.o
@@ -57,3 +57,7 @@ LIBRARY_DEFINE-a+= -I$(top_srcdir)/netwo
networking_OBJ:= $(patsubst %,$(objdir)/%,$(NETWORKING-y))
+$(networking_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/networking.a: $(networking_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/networking.a
+
diff -X excl -rdup busybox.oorig/networking/libiproute/Makefile.in busybox/networking/libiproute/Makefile.in
--- busybox.oorig/networking/libiproute/Makefile.in 2006-03-02 09:27:36.000000000 +0100
+++ busybox/networking/libiproute/Makefile.in 2006-03-07 15:54:50.000000000 +0100
@@ -3,10 +3,9 @@
# Copyright (C) 1999-2004 by Erik Andersen <andersen at codepoet.org>
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-#
-srcdir=$(top_srcdir)/networking/libiproute
-objdir=$(top_builddir)/networking/libiproute
+srcdir:=$(top_srcdir)/networking/libiproute
+objdir:=$(top_builddir)/networking/libiproute
LIBIPROUTE-$(CONFIG_IP) += \
ip_parse_common_args \
@@ -68,3 +67,7 @@ LIBRARY_SRC-a+=$(LIBIPROUTE_SRC-a)
networking_libiproute_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBIPROUTE-y))
+$(networking_libiproute_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c
+$(objdir)/networking.a: $(networking_libiproute_OBJ$(os))
+libraries-y:=$(libraries-y) $(objdir)/networking.a
+
diff -X excl -rdup busybox.oorig/networking/udhcp/Makefile.in busybox/networking/udhcp/Makefile.in
--- busybox.oorig/networking/udhcp/Makefile.in 2006-03-02 09:27:39.000000000 +0100
+++ busybox/networking/udhcp/Makefile.in 2006-03-07 15:55:02.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/networking/udhcp
-objdir=$(top_builddir)/networking/udhcp
+srcdir:=$(top_srcdir)/networking/udhcp
+objdir:=$(top_builddir)/networking/udhcp
#ok, so I forgot how to do an or, but this is a quick and dirty hack
ifeq ($(strip $(CONFIG_UDHCPC)),y)
@@ -88,3 +88,7 @@ endif
networking_udhcp_OBJ:=$(patsubst %.c,$(objdir)/%.o,$(UDHCP-y))
+$(networking_udhcp_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/udhcp.a: $(networking_udhcp_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/udhcp.a
+
diff -X excl -rdup busybox.oorig/procps/Makefile.in busybox/procps/Makefile.in
--- busybox.oorig/procps/Makefile.in 2006-03-02 09:28:00.000000000 +0100
+++ busybox/procps/Makefile.in 2006-03-07 16:06:27.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/procps
-objdir=$(top_builddir)/procps
+srcdir:=$(top_srcdir)/procps
+objdir:=$(top_builddir)/procps
PROCPS-$(CONFIG_FREE) += free.o
PROCPS-$(CONFIG_KILL) += kill.o
@@ -25,3 +25,7 @@ APPLET_SRC-a+=$(PROCPS_SRC-a)
procps_OBJ:= $(patsubst %,$(objdir)/%,$(PROCPS-y))
+$(procps_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/procps.a: $(procps_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/procps.a
+
diff -X excl -rdup busybox.oorig/shell/Makefile.in busybox/shell/Makefile.in
--- busybox.oorig/shell/Makefile.in 2006-03-02 09:27:54.000000000 +0100
+++ busybox/shell/Makefile.in 2006-03-07 15:58:28.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/shell
-objdir=$(top_builddir)/shell
+srcdir:=$(top_srcdir)/shell
+objdir:=$(top_builddir)/shell
SHELL-$(CONFIG_ASH) += ash.o
SHELL-$(CONFIG_HUSH) += hush.o
@@ -21,3 +21,7 @@ APPLET_SRC-a+=$(SHELLT_SRC-a)
shell_OBJ:= $(patsubst %,$(objdir)/%,$(SHELL-y))
+$(shell_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/shell.a: $(shell_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/shell.a
+
diff -X excl -rdup busybox.oorig/sysklogd/Makefile.in busybox/sysklogd/Makefile.in
--- busybox.oorig/sysklogd/Makefile.in 2006-03-02 09:27:51.000000000 +0100
+++ busybox/sysklogd/Makefile.in 2006-03-07 15:57:48.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/sysklogd
-objdir=$(top_builddir)/sysklogd
+srcdir:=$(top_srcdir)/sysklogd
+objdir:=$(top_builddir)/sysklogd
SYSKLOGD-$(CONFIG_KLOGD) += klogd.o
SYSKLOGD-$(CONFIG_LOGGER) += logger.o
@@ -20,3 +20,7 @@ APPLET_SRC-a+=$(SYSKLOGD_SRC-a)
sysklogd_OBJ:= $(patsubst %,$(objdir)/%,$(SYSKLOGD-y))
+$(sysklogd_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/sysklogd.a: $(sysklogd_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/sysklogd.a
+
diff -X excl -rdup busybox.oorig/util-linux/Makefile.in busybox/util-linux/Makefile.in
--- busybox.oorig/util-linux/Makefile.in 2006-03-02 09:28:02.000000000 +0100
+++ busybox/util-linux/Makefile.in 2006-03-07 16:06:48.000000000 +0100
@@ -4,8 +4,8 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir=$(top_srcdir)/util-linux
-objdir=$(top_builddir)/util-linux
+srcdir:=$(top_srcdir)/util-linux
+objdir:=$(top_builddir)/util-linux
UTIL-LINUX-$(CONFIG_DMESG) +=dmesg.o
UTIL-LINUX-$(CONFIG_FBSET) +=fbset.o
@@ -48,3 +48,7 @@ endif
util-linux_OBJ:= $(patsubst %,$(objdir)/%,$(UTIL-LINUX-y))
+$(util-linux_OBJ): $(objdir)/%.o: $(srcdir)/%.c
+$(objdir)/util-linux.a: $(util-linux_OBJ)
+libraries-y:=$(libraries-y) $(objdir)/util-linux.a
+
More information about the busybox
mailing list