aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-03-01 22:54:48 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-03-01 22:54:48 +0000
commit5d26126b9e8fd6c6f5098dbaa2e5b9e2901749bf (patch)
tree233c051da862595b6e473e832051708e2d9803cb /e2fsprogs
parent12c2429a4242a157217c5bc9673a531fa1e1de61 (diff)
downloadbusybox-w32-5d26126b9e8fd6c6f5098dbaa2e5b9e2901749bf.tar.gz
busybox-w32-5d26126b9e8fd6c6f5098dbaa2e5b9e2901749bf.tar.bz2
busybox-w32-5d26126b9e8fd6c6f5098dbaa2e5b9e2901749bf.zip
- fixes parallel builds (make -j)
- use less resources for the buildsystem itself
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/Makefile.in55
1 files changed, 27 insertions, 28 deletions
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in
index e4cfdf545..8a46af113 100644
--- a/e2fsprogs/Makefile.in
+++ b/e2fsprogs/Makefile.in
@@ -4,12 +4,8 @@
4# 4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7E2FSPROGS_AR:=e2fsprogs.a 7srcdir:=$(top_srcdir)/e2fsprogs
8 8objdir:=$(top_builddir)/e2fsprogs
9E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
10E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs
11
12E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h
13 9
14BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \ 10BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
15 probe.c read.c resolve.c save.c tag.c 11 probe.c read.c resolve.c save.c tag.c
@@ -39,22 +35,23 @@ UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
39UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC)) 35UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
40UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS)) 36UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
41 37
38
42# for building out-of-tree we need to make sure that the directories to hold 39# for building out-of-tree we need to make sure that the directories to hold
43# the object tree are created 40# the object tree are created
44$(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid): 41$(patsubst %,$(objdir)/%, blkid e2fsck e2p ext2fs uuid):
45 @mkdir -p "$@" 42 @mkdir -p "$@"
46 43
47# make sure that the directories are order-only prerequisites. Otherwise we 44# make sure that the directories are order-only prerequisites. Otherwise we
48# may have object files created after the timestamp of the directory was 45# may have object files created after the timestamp of the directory was
49# updated which would lead to spurious rebuilds (as some of the dentries 46# updated which would lead to spurious rebuilds (as some of the dentries
50# may be older than the dir itself). 47# may be older than the dir itself).
51$(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid 48$(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/%.c|$(objdir)/blkid
52$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck 49$(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/%.c|$(objdir)/e2fsck
53$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p 50$(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/%.c|$(objdir)/e2p
54$(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs 51$(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/%.c|$(objdir)/ext2fs
55$(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid 52$(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/%.c|$(objdir)/uuid
53
56 54
57E2FSPROGS-y:=
58E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) 55E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
59E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) 56E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
60E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(UUID_OBJS) 57E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(UUID_OBJS)
@@ -63,24 +60,26 @@ E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EX
63E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) 60E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
64 61
65E2FSPROGS-y:=$(sort $(E2FSPROGS-y)) 62E2FSPROGS-y:=$(sort $(E2FSPROGS-y))
66 63ifneq ($(E2FSPROGS-y),)
67ifneq ($(strip $(E2FSPROGS-y)),) 64CFLAGS-e2fsprogs := -include $(srcdir)/e2fsbb.h
68libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
69endif 65endif
70 66
71E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y)) 67E2FSPROGS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(E2FSPROGS-y))
72E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS)) 68E2FSPROGS_SRC-a:=$(wildcard $(srcdir)/*.c) $(patsubst %,$(srcdir)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
73APPLET_SRC-y+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-y) 69APPLET_SRC-y+=$(E2FSPROGS_SRC-y)
74APPLET_SRC-a+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-a) 70APPLET_SRC-a+=$(E2FSPROGS_SRC-a)
71
72$(warning FIXME: change .c to include their stuff relative to $(srcdir))
73E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(srcdir)/%,blkid e2fsck e2p ext2fs uuid)
74CFLAGS-blkid=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
75CFLAGS-e2fsck=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
76CFLAGS-e2p=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
77CFLAGS-ext2fs=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
78CFLAGS-uuid=$(E2FSPROGS_TMP_KLUDGE) $(CFLAGS-e2fsprogs)
75 79
76# XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC)
77E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid)
78 80
79APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE) 81APPLETS_DEFINE-y+=$(CFLAGS-e2fsprogs) -I$(srcdir) $(E2FSPROGS_TMP_KLUDGE)
80APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE) 82APPLETS_DEFINE-a+=$(CFLAGS-e2fsprogs) -I$(srcdir) $(E2FSPROGS_TMP_KLUDGE)
81 83
82$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y)) 84e2fsprogs_OBJ:= $(patsubst %,$(objdir)/%,$(E2FSPROGS-y))
83 $(do_ar)
84 85
85$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
86 $(compile.c) $(E2FSPROGS_CFLAGS)