summaryrefslogtreecommitdiff
path: root/e2fsprogs/Makefile.in
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-03-13 19:04:00 +0000
committerBernhard Reutner-Fischer2006-03-13 19:04:00 +0000
commitdf10094870c28cc0c6c5577c9aa03b8ede9cb8a6 (patch)
tree49493696039b285aa751a5bc884fc70c9c85e878 /e2fsprogs/Makefile.in
parentc5b1d4d6b14f22b5e2f7ae42eb01bf2746b8001c (diff)
downloadbusybox-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.zip
busybox-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.tar.gz
- revert back to r14406
Diffstat (limited to 'e2fsprogs/Makefile.in')
-rw-r--r--e2fsprogs/Makefile.in94
1 files changed, 28 insertions, 66 deletions
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in
index 0ca1c97..e4cfdf5 100644
--- a/e2fsprogs/Makefile.in
+++ b/e2fsprogs/Makefile.in
@@ -4,8 +4,12 @@
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.
-srcdir:=$(top_srcdir)/e2fsprogs
-objdir:=$(top_builddir)/e2fsprogs
+E2FSPROGS_AR:=e2fsprogs.a
+
+E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
+E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs
+
+E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h
BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
probe.c read.c resolve.c save.c tag.c
@@ -35,58 +39,22 @@ UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
-
# for building out-of-tree we need to make sure that the directories to hold
# the object tree are created
-$(patsubst %,$(objdir)/%, blkid e2fsck e2p ext2fs uuid):
+$(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid):
@mkdir -p "$@"
# make sure that the directories are order-only prerequisites. Otherwise we
# 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).
-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
-$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/%.c|$(objdir)/e2fsck
-$(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
-
+$(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid
+$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck
+$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p
+$(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs
+$(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid
+E2FSPROGS-y:=
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)
@@ -95,30 +63,24 @@ E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EX
E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
E2FSPROGS-y:=$(sort $(E2FSPROGS-y))
-ifneq ($(E2FSPROGS-y),)
-CFLAGS-e2fsprogs := -include $(srcdir)/e2fsbb.h
-endif
-
-E2FSPROGS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(E2FSPROGS-y))
-E2FSPROGS_SRC-a:=$(wildcard $(srcdir)/*.c) $(patsubst %,$(srcdir)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
-APPLET_SRC-y+=$(E2FSPROGS_SRC-y)
-APPLET_SRC-a+=$(E2FSPROGS_SRC-a)
-$(warning FIXME: change .c to include their stuff relative to $(srcdir))
-E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(srcdir)/%,blkid e2fsck e2p ext2fs uuid)
-CFLAGS-blkid=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
-CFLAGS-e2fsck=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
-CFLAGS-e2p=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
-CFLAGS-ext2fs=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
-CFLAGS-uuid=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
+ifneq ($(strip $(E2FSPROGS-y)),)
+libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
+endif
+E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y))
+E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
+APPLET_SRC-y+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-y)
+APPLET_SRC-a+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-a)
-APPLETS_DEFINE-y+=$(CFLAGS-e2fsprogs) -I$(srcdir) $(E2FSPROGS_TMP_KLUDGE)
-APPLETS_DEFINE-a+=$(CFLAGS-e2fsprogs) -I$(srcdir) $(E2FSPROGS_TMP_KLUDGE)
+# XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC)
+E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid)
-e2fsprogs_OBJ:= $(patsubst %,$(objdir)/%,$(E2FSPROGS-y))
+APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
+APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
-$(e2fsprogs_OBJ): $(objdir)/%.o: $(srcdir)/%.c
-$(objdir)/e2fsprogs.a: $(e2fsprogs_OBJ)
-libraries-y:=$(libraries-y) $(objdir)/e2fsprogs.a
+$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
+ $(do_ar)
+$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
+ $(compile.c) $(E2FSPROGS_CFLAGS)