aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile63
-rw-r--r--Rules.mak65
-rw-r--r--TODO3
-rw-r--r--applets/Makefile.in5
-rw-r--r--archival/Makefile.in5
-rw-r--r--archival/libunarchive/Makefile.in5
-rw-r--r--console-tools/Makefile.in5
-rw-r--r--coreutils/Makefile.in4
-rw-r--r--coreutils/libcoreutils/Makefile.in5
-rw-r--r--debianutils/Makefile.in5
-rw-r--r--e2fsprogs/Makefile.in5
-rw-r--r--editors/Makefile.in5
-rw-r--r--findutils/Makefile.in5
-rw-r--r--init/Makefile.in5
-rw-r--r--libbb/Makefile.in20
-rw-r--r--libpwdgrp/Makefile.in8
-rw-r--r--loginutils/Makefile.in5
-rw-r--r--miscutils/Makefile.in5
-rw-r--r--modutils/Makefile.in5
-rw-r--r--networking/Makefile.in4
-rw-r--r--networking/libiproute/Makefile.in5
-rw-r--r--networking/udhcp/Makefile.in5
-rw-r--r--procps/Makefile.in5
-rw-r--r--scripts/config/Makefile20
-rw-r--r--scripts/config/mconf.c5
-rw-r--r--shell/Makefile.in5
-rw-r--r--sysklogd/Makefile.in5
-rw-r--r--util-linux/Makefile.in4
28 files changed, 158 insertions, 128 deletions
diff --git a/Makefile b/Makefile
index 80d560861..9faef9791 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ $(if $(wildcard $(KBUILD_OUTPUT)),, \
.PHONY: $(MAKECMDGOALS)
$(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile all_tree
- $(MAKE) -C $(KBUILD_OUTPUT) \
+ $(Q)$(MAKE) -C $(KBUILD_OUTPUT) \
top_srcdir=$(top_srcdir) \
top_builddir=$(top_builddir) \
KBUILD_SRC=$(top_srcdir) \
@@ -159,13 +159,13 @@ all: menuconfig
# ---------------------------------------------------------------------------
scripts/config/conf: scripts/config/Makefile
- $(MAKE) -C scripts/config conf
+ $(Q)$(MAKE) -C scripts/config conf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
fi
scripts/config/mconf: scripts/config/Makefile
- $(MAKE) -C scripts/config ncurses conf mconf
+ $(Q)$(MAKE) -C scripts/config ncurses conf mconf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
fi
@@ -280,8 +280,7 @@ $(LIBBUSYBOX_SONAME):
ifndef MAJOR_VERSION
$(error MAJOR_VERSION needed for $@ is not defined)
endif
- $(CC) $(CFLAGS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) \
- $(LIB_LDFLAGS) \
+ $(do_link) $(LIB_CFLAGS) $(LIB_LDFLAGS) \
-Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \
-Wl,-z,combreloc $(LIB_LDFLAGS) \
-o $(@) \
@@ -290,21 +289,21 @@ endif
-Wl,--no-whole-archive -Wl,--end-group
$(RM_F) $(DO_INSTALL_LIBS)
for i in $(DO_INSTALL_LIBS); do $(LN_S) -v $(@) $$i ; done
- $(STRIPCMD) $@
+ $(do_strip)
endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
busybox: .depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(libraries-y)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(PROG_CFLAGS) $(LDFLAGS) \
+ $(do_link) $(PROG_CFLAGS) \
-o $@ -Wl,--start-group \
$(APPLETS_DEFINE) $(APPLET_SRC) \
$(BUSYBOX_DEFINE) $(BUSYBOX_SRC) $(libraries-y) \
$(LDBUSYBOX) $(LIBRARIES) \
-Wl,--end-group
- $(STRIPCMD) $@
+ $(do_strip)
busybox.links: $(top_srcdir)/applets/busybox.mkll include/bb_config.h $(top_srcdir)/include/applets.h
- - $(SHELL) $^ >$@
+ $(Q)-$(SHELL) $^ >$@
install: $(top_srcdir)/applets/install.sh busybox busybox.links
DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
@@ -354,33 +353,34 @@ sizes:
doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod
- -mkdir -p docs
- - ( cat $(top_srcdir)/docs/busybox_header.pod; \
+ $(disp_doc)
+ $(Q)-mkdir -p docs
+ $(Q)-( cat $(top_srcdir)/docs/busybox_header.pod; \
$(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \
cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod
docs/BusyBox.txt: docs/busybox.pod
- $(SECHO)
- $(SECHO) BusyBox Documentation
- $(SECHO)
- -mkdir -p docs
- -pod2text $< > $@
+ $(disp_doc)
+ $(Q)-mkdir -p docs
+ $(Q)-pod2text $< > $@
docs/BusyBox.1: docs/busybox.pod
- - mkdir -p docs
- - pod2man --center=BusyBox --release="version $(VERSION)" \
+ $(disp_doc)
+ $(Q)-mkdir -p docs
+ $(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \
$< > $@
docs/BusyBox.html: docs/busybox.net/BusyBox.html
- - mkdir -p docs
- -@ $(RM_F) docs/BusyBox.html
- -@ cp docs/busybox.net/BusyBox.html docs/BusyBox.html
+ $(disp_doc)
+ $(Q)-mkdir -p docs
+ $(Q)-$(RM_F) docs/BusyBox.html
+ $(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html
docs/busybox.net/BusyBox.html: docs/busybox.pod
- -@ mkdir -p docs/busybox.net
- - pod2html --noindex $< > \
+ $(Q)-mkdir -p docs/busybox.net
+ $(Q)-pod2html --noindex $< > \
docs/busybox.net/BusyBox.html
- -@ $(RM_F) pod2htm*
+ $(Q)-$(RM_F) pod2htm*
# The nifty new buildsystem stuff
scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c
@@ -392,16 +392,18 @@ ifeq ($(strip $(CONFIG_BBCONFIG)),y)
DEP_INCLUDES += include/bbconfigopts.h
include/bbconfigopts.h: .config
- $(top_srcdir)/scripts/config/mkconfigs > $@
+ $(disp_gen)
+ $(Q)$(top_srcdir)/scripts/config/mkconfigs > $@
endif
depend dep: .depend
.depend: scripts/bb_mkdep $(DEP_INCLUDES)
- @$(RM_F) .depend
- @mkdir -p include/config
- scripts/bb_mkdep -c include/config.h -c include/bb_config.h \
+ $(disp_gen)
+ $(Q)$(RM_F) .depend
+ $(Q)mkdir -p include/config
+ $(Q)scripts/bb_mkdep -c include/config.h -c include/bb_config.h \
-I $(top_srcdir)/include $(top_srcdir) > $@.tmp
- mv $@.tmp $@
+ $(Q)mv $@.tmp $@
include/config.h: .config
@if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \
@@ -423,7 +425,8 @@ include/bb_config.h: include/config.h
#define USAGE_HAVE_DOT_CONFIG(a)
#endif
include/_usage.h: .config
- awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@)
+ $(disp_gen)
+ $(Q)awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@)
clean:
- $(MAKE) -C scripts/config $@
diff --git a/Rules.mak b/Rules.mak
index 4ad4dc451..ab6e311c6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -121,16 +121,6 @@ check_ld=$(shell \
$(LD) --help | grep -q "\$(1)" && echo "-Wl,$(1)" ; \
fi)
-
-# Setup some shortcuts so that silent mode is silent like it should be
-ifeq ($(subst s,,$(MAKEFLAGS)),$(MAKEFLAGS))
-export MAKE_IS_SILENT=n
-SECHO=@echo
-else
-export MAKE_IS_SILENT=y
-SECHO=-@false
-endif
-
CFLAGS+=$(call check_gcc,-funsigned-char,)
CFLAGS+=$(call check_gcc,-mmax-stack-frame=256,)
@@ -262,4 +252,59 @@ ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y)
INSTALL_OPTS=
endif
+#------------------------------------------------------------
+# Make the output nice and tight
+MAKEFLAGS += --no-print-directory
+export MAKE_IS_SILENT=n
+ifneq ($(findstring s,$(MAKEFLAGS)),)
+export MAKE_IS_SILENT=y
+SECHO := @-false
+DISP := sil
+Q := @
+else
+ifneq ($(V)$(VERBOSE),)
+SECHO := @-false
+DISP := ver
+Q :=
+else
+SECHO := @echo
+DISP := pur
+Q := @
+endif
+endif
+
+show_objs = $(subst $(top_builddir)/,,$(subst ../,,$@))
+pur_disp_compile.c = echo " "CC $(show_objs)
+pur_disp_compile.h = echo " "HOSTCC $(show_objs)
+pur_disp_strip = echo " "STRIP $(show_objs)
+pur_disp_link = echo " "LINK $(show_objs)
+pur_disp_ar = echo " "AR $(ARFLAGS) $(show_objs)
+sil_disp_compile.c = true
+sil_disp_compile.h = true
+sil_disp_strip = true
+sil_disp_link = true
+sil_disp_ar = true
+ver_disp_compile.c = echo $(cmd_compile.c)
+ver_disp_compile.h = echo $(cmd_compile.h)
+ver_disp_strip = echo $(cmd_strip)
+ver_disp_link = echo $(cmd_link)
+ver_disp_ar = echo $(cmd_ar)
+disp_compile.c = $($(DISP)_disp_compile.c)
+disp_compile.h = $($(DISP)_disp_compile.h)
+disp_strip = $($(DISP)_disp_strip)
+disp_link = $($(DISP)_disp_link)
+disp_ar = $($(DISP)_disp_ar)
+disp_gen = $(SECHO) " "GEN $@ ; true
+disp_doc = $(SECHO) " "DOC $(subst docs/,,$@) ; true
+cmd_compile.c = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+cmd_compile.h = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
+cmd_strip = $(STRIPCMD) $@
+cmd_link = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS)
+cmd_ar = $(AR) $(ARFLAGS) $@ $^
+compile.c = @$(disp_compile.c) ; $(cmd_compile.c)
+compile.h = @$(disp_compile.h) ; $(cmd_compile.h)
+do_strip = @$(disp_strip) ; $(cmd_strip)
+do_link = @$(disp_link) ; $(cmd_link)
+do_ar = @$(disp_ar) ; $(cmd_ar)
+
.PHONY: dummy
diff --git a/TODO b/TODO
index 203ccdf9f..26ceadbe9 100644
--- a/TODO
+++ b/TODO
@@ -2,6 +2,9 @@ Busybox TODO
Stuff that needs to be done. All of this is fair game for 1.2.
+build system
+ make -j is broken, -j1 is forced atm
+----
find
doesn't understand (), lots of susv3 stuff.
----
diff --git a/applets/Makefile.in b/applets/Makefile.in
index 80b6da0b1..a4890c2fb 100644
--- a/applets/Makefile.in
+++ b/applets/Makefile.in
@@ -19,9 +19,8 @@ APPLET_SRC-a+=$(APPLET_SRC)
libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
- $(AR) $(ARFLAGS) $@ $(APPLET_OBJ)
+ $(do_ar)
$(APPLET_OBJ): $(top_builddir)/.config
$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/archival/Makefile.in b/archival/Makefile.in
index b4fcabf04..d62507e0a 100644
--- a/archival/Makefile.in
+++ b/archival/Makefile.in
@@ -34,8 +34,7 @@ APPLET_SRC-y+=$(ARCHIVAL_SRC-y)
APPLET_SRC-a+=$(ARCHIVAL_SRC-a)
$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
- $(AR) $(ARFLAGS) $@ $(^)
+ $(do_ar)
$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in
index 2b49398df..265079c10 100644
--- a/archival/libunarchive/Makefile.in
+++ b/archival/libunarchive/Makefile.in
@@ -79,8 +79,7 @@ LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y)
LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y))
- $(AR) $(ARFLAGS) $(@) $(^)
+ $(do_ar)
$(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/console-tools/Makefile.in b/console-tools/Makefile.in
index 87858cd8e..42fc590cd 100644
--- a/console-tools/Makefile.in
+++ b/console-tools/Makefile.in
@@ -29,8 +29,7 @@ APPLET_SRC-y+=$(CONSOLETOOLS_SRC-y)
APPLET_SRC-a+=$(CONSOLETOOLS_SRC-a)
$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS-y))
+ $(do_ar)
$(CONSOLETOOLS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/coreutils/Makefile.in b/coreutils/Makefile.in
index 54ccf921f..4e7b7bd20 100644
--- a/coreutils/Makefile.in
+++ b/coreutils/Makefile.in
@@ -89,7 +89,7 @@ APPLET_SRC-y+=$(COREUTILS_SRC-y)
APPLET_SRC-a+=$(COREUTILS_SRC-a)
$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
+ $(do_ar)
$(COREUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+ $(compile.c)
diff --git a/coreutils/libcoreutils/Makefile.in b/coreutils/libcoreutils/Makefile.in
index 1f0c19e73..092019124 100644
--- a/coreutils/libcoreutils/Makefile.in
+++ b/coreutils/libcoreutils/Makefile.in
@@ -45,8 +45,7 @@ endif
LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
- $(AR) $(ARFLAGS) $(@) $(^)
+ $(do_ar)
$(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/debianutils/Makefile.in b/debianutils/Makefile.in
index 4a715d0d8..2fc3dfd75 100644
--- a/debianutils/Makefile.in
+++ b/debianutils/Makefile.in
@@ -25,8 +25,7 @@ APPLET_SRC-y+=$(DEBIANUTILS_SRC-y)
APPLET_SRC-a+=$(DEBIANUTILS_SRC-a)
$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
+ $(do_ar)
$(DEBIANUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in
index 6873e5adc..28e0e4dee 100644
--- a/e2fsprogs/Makefile.in
+++ b/e2fsprogs/Makefile.in
@@ -77,8 +77,7 @@ APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
+ $(do_ar)
$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(E2FSPROGS_CFLAGS) -c -o $@ $<
-
+ $(compile.c) $(E2FSPROGS_CFLAGS)
diff --git a/editors/Makefile.in b/editors/Makefile.in
index 114d6200d..83e13921e 100644
--- a/editors/Makefile.in
+++ b/editors/Makefile.in
@@ -31,8 +31,7 @@ ifeq ($(needlibm-y),y)
endif
$(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
+ $(do_ar)
$(EDITOR_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/findutils/Makefile.in b/findutils/Makefile.in
index 418f43a38..e43260da4 100644
--- a/findutils/Makefile.in
+++ b/findutils/Makefile.in
@@ -23,8 +23,7 @@ APPLET_SRC-y+=$(FINDUTILS_SRC-y)
APPLET_SRC-a+=$(FINDUTILS_SRC-a)
$(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
+ $(do_ar)
$(FINDUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/init/Makefile.in b/init/Makefile.in
index 02d379445..c7d3cc4a4 100644
--- a/init/Makefile.in
+++ b/init/Makefile.in
@@ -47,8 +47,7 @@ APPLET_SRC-y+=$(INIT_SRC-y)
APPLET_SRC-a+=$(INIT_SRC-a)
$(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y))
+ $(do_ar)
$(INIT_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/libbb/Makefile.in b/libbb/Makefile.in
index b23e10b1a..3f3348148 100644
--- a/libbb/Makefile.in
+++ b/libbb/Makefile.in
@@ -61,7 +61,7 @@ LIBBB_MOBJ0:=full_version.o \
bb_dev_null.o bb_common_bufsiz1.o
LIBBB_MOBJ0:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ0))
$(LIBBB_MOBJ0):$(LIBBB_MSRC0)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC1:=$(srcdir)/xfuncs.c
LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \
@@ -69,39 +69,39 @@ LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \
xferror.o xferror_stdout.o xfflush_stdout.o strlen.o
LIBBB_MOBJ1:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ1))
$(LIBBB_MOBJ1):$(LIBBB_MSRC1)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC2:=$(srcdir)/printf.c
LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o
LIBBB_MOBJ2:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ2))
$(LIBBB_MOBJ2):$(LIBBB_MSRC2)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC3:=$(srcdir)/xgetularg.c
LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \
xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o
LIBBB_MOBJ3:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ3))
$(LIBBB_MOBJ3):$(LIBBB_MSRC3)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC4:=$(srcdir)/safe_strtol.c
LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o
LIBBB_MOBJ4:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ4))
$(LIBBB_MOBJ4):$(LIBBB_MSRC4)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC5:=$(srcdir)/bb_pwd.c
LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \
bb_getug.o get_ug_id.o
LIBBB_MOBJ5:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ5))
$(LIBBB_MOBJ5):$(LIBBB_MSRC5)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
LIBBB_MSRC6:=$(srcdir)/llist.c
LIBBB_MOBJ6:=llist_add_to.o llist_add_to_end.o llist_free_one.o llist_free.o
LIBBB_MOBJ6:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ6))
$(LIBBB_MOBJ6):$(LIBBB_MSRC6)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -o $@ -c $<
+ $(compile.c) -DL_$(notdir $*)
# We need the names of the object files built from MSRC for the L_ defines
@@ -131,8 +131,7 @@ endif
# all 1:1 objects
LIBBB_OBJS:=$(patsubst $(srcdir)/%.c,$(LIBBB_DIR)/%.o, $(LIBBB-y))
$(LIBBB_DIR)/%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
-
+ $(compile.c)
LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c)
LIBRARY_SRC-y+=$(LIBBB-y)
@@ -144,5 +143,4 @@ LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y)
LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y)
$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_ALL_MOBJ)
- $(AR) $(ARFLAGS) $(@) $(^)
-
+ $(do_ar)
diff --git a/libpwdgrp/Makefile.in b/libpwdgrp/Makefile.in
index 550611681..c74a768c1 100644
--- a/libpwdgrp/Makefile.in
+++ b/libpwdgrp/Makefile.in
@@ -44,12 +44,10 @@ LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
- $(AR) $(ARFLAGS) $(@) $(^)
+ $(do_ar)
$(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
+ $(compile.c) -DL_$(notdir $*)
$(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
-
-
+ $(compile.c) -DL_$(notdir $*)
diff --git a/loginutils/Makefile.in b/loginutils/Makefile.in
index a2cfd8a67..30085b395 100644
--- a/loginutils/Makefile.in
+++ b/loginutils/Makefile.in
@@ -42,8 +42,7 @@ ifeq ($(needcrypt-y),y)
endif
$(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
+ $(do_ar)
$(LOGINUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in
index 6cd2b022c..9a45b2f82 100644
--- a/miscutils/Makefile.in
+++ b/miscutils/Makefile.in
@@ -46,8 +46,7 @@ ifeq ($(needlibm-y),y)
endif
$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
+ $(do_ar)
$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/modutils/Makefile.in b/modutils/Makefile.in
index f9934816e..73c257a00 100644
--- a/modutils/Makefile.in
+++ b/modutils/Makefile.in
@@ -24,8 +24,7 @@ APPLET_SRC-y+=$(MODUTILS_SRC-y)
APPLET_SRC-a+=$(MODUTILS_SRC-a)
$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
+ $(do_ar)
$(MODUTILS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/networking/Makefile.in b/networking/Makefile.in
index 50eb450e7..a07af7abd 100644
--- a/networking/Makefile.in
+++ b/networking/Makefile.in
@@ -62,7 +62,7 @@ ifeq ($(needcrypt-y),y)
endif
$(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
+ $(do_ar)
$(NETWORKING_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+ $(compile.c)
diff --git a/networking/libiproute/Makefile.in b/networking/libiproute/Makefile.in
index 37d556dd9..6b7bd900c 100644
--- a/networking/libiproute/Makefile.in
+++ b/networking/libiproute/Makefile.in
@@ -86,8 +86,7 @@ endif
endif
$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)/%,$(LIBIPROUTE-y))
- $(AR) $(ARFLAGS) $@ $(^)
+ $(do_ar)
$(LIBIPROUTE_DIR)/%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/networking/udhcp/Makefile.in b/networking/udhcp/Makefile.in
index 8573a2fc4..c9e0f5b89 100644
--- a/networking/udhcp/Makefile.in
+++ b/networking/udhcp/Makefile.in
@@ -45,8 +45,7 @@ APPLETS_DEFINE-y+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
APPLETS_DEFINE-a+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
$(UDHCP_DIR)$(UDHCP_AR): $(UDHCP_OBJS)
- $(AR) $(ARFLAGS) $@ $(UDHCP_OBJS)
+ $(do_ar)
$(UDHCP_OBJS): $(UDHCP_DIR)%.o : $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DIN_BUSYBOX -c $< -o $@
-
+ $(compile.c) -DIN_BUSYBOX
diff --git a/procps/Makefile.in b/procps/Makefile.in
index b7eb7dca1..c177c9041 100644
--- a/procps/Makefile.in
+++ b/procps/Makefile.in
@@ -29,8 +29,7 @@ APPLET_SRC-y+=$(PROCPS_SRC-y)
APPLET_SRC-a+=$(PROCPS_SRC-a)
$(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y))
+ $(do_ar)
$(PROCPS_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/scripts/config/Makefile b/scripts/config/Makefile
index 4d95ce078..c1cda3e2a 100644
--- a/scripts/config/Makefile
+++ b/scripts/config/Makefile
@@ -50,17 +50,19 @@ MCONF_OBJS = $(patsubst %.c,%.o, $(MCONF_SRC) $(LXD_SRC))
SHARED_OBJS = $(patsubst %.c,%.o, $(SHARED_SRC))
conf: $(CONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
+ $(SECHO) " "HOSTCC $@ ; true
+ $(Q)$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
mconf: $(MCONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
+ $(SECHO) " "HOSTCC $@ ; true
+ $(Q)$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
$(CONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
+ $(compile.h) -I.
$(MCONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS)
@[ -d $(@D) ] || mkdir -v $(@D)
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
+ $(compile.h) $(HOSTNCURSES) -I.
lkc_defs.h: $(srcdir)/lkc_proto.h
@sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
@@ -81,21 +83,21 @@ lex.%.c: $(srcdir)/%.l
else
lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I$(srcdir) -c $< -o $@
+ $(compile.h) -I$(srcdir)
lex.zconf.c: $(srcdir)/lex.zconf.c_shipped
- cp $< $@
+ $(Q)cp $< $@
zconf.tab.c: $(srcdir)/zconf.tab.c_shipped
- cp $< $@
+ $(Q)cp $< $@
zconf.tab.h: $(srcdir)/zconf.tab.h_shipped
- cp $< $@
+ $(Q)cp $< $@
endif
zconf.tab.o: zconf.tab.c lex.zconf.c $(srcdir)/confdata.c $(srcdir)/expr.c \
$(srcdir)/symbol.c $(srcdir)/menu.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I$(srcdir) -I. -c $< -o $@
+ $(compile.h) -I$(srcdir) -I.
.PHONY: ncurses
diff --git a/scripts/config/mconf.c b/scripts/config/mconf.c
index 5bc2abdd8..1b21575ad 100644
--- a/scripts/config/mconf.c
+++ b/scripts/config/mconf.c
@@ -967,9 +967,8 @@ int main(int ac, char **av)
if (stat == 0) {
conf_write(NULL);
- printf("\n\n"
- "*** End of BusyBox configuration.\n"
- "*** Check the top-level Makefile for additional configuration options.\n\n");
+ printf("\n"
+ "*** End of BusyBox configuration.\n");
} else
printf("\n\nYour BusyBox configuration changes were NOT saved.\n\n");
diff --git a/shell/Makefile.in b/shell/Makefile.in
index f61f90a1a..a2040995d 100644
--- a/shell/Makefile.in
+++ b/shell/Makefile.in
@@ -25,8 +25,7 @@ APPLET_SRC-y+=$(SHELLT_SRC-y)
APPLET_SRC-a+=$(SHELLT_SRC-a)
$(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
+ $(do_ar)
$(SHELL_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/sysklogd/Makefile.in b/sysklogd/Makefile.in
index 2b913f784..2312212de 100644
--- a/sysklogd/Makefile.in
+++ b/sysklogd/Makefile.in
@@ -24,8 +24,7 @@ APPLET_SRC-y+=$(SYSKLOGD_SRC-y)
APPLET_SRC-a+=$(SYSKLOGD_SRC-a)
$(SYSKLOGD_DIR)$(SYSKLOGD_AR): $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y))
+ $(do_ar)
$(SYSKLOGD_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
-
+ $(compile.c)
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in
index de7e210ba..90100aceb 100644
--- a/util-linux/Makefile.in
+++ b/util-linux/Makefile.in
@@ -46,10 +46,10 @@ APPLET_SRC-y+=$(UTILLINUX_SRC-y)
APPLET_SRC-a+=$(UTILLINUX_SRC-a)
$(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
- $(AR) $(ARFLAGS) $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
+ $(do_ar)
$(UTILLINUX_DIR)%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+ $(compile.c)
ifneq ($(strip $(CONFIG_LFS)),y)
ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y)