summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley2005-08-24 00:41:52 +0000
committerRob Landley2005-08-24 00:41:52 +0000
commite1d9633e20d8f3153602249441df916cd31f303f (patch)
tree0e9ce3743640ad5f49669e3e15e8d5a04abf1a3c /Makefile
parenta937640bff9ad496e5c41d93918bbc7e51b2068e (diff)
downloadbusybox-e1d9633e20d8f3153602249441df916cd31f303f.zip
busybox-e1d9633e20d8f3153602249441df916cd31f303f.tar.gz
Bernhard Fischer submitted a couple of Makefile patches:
- Fix building out-of-tree - remove duplicate rule in toplevel Makefile - peruse make's builtin notion of `dirname $@'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 6 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 187f3fc..757c41b 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ endif
export srctree=$(top_srcdir)
vpath %/Config.in $(srctree)
-include $(top_builddir)/Rules.mak
+include $(top_srcdir)/Rules.mak
DIRS:=applets archival archival/libunarchive coreutils console-tools \
debianutils editors findutils init miscutils modutils networking \
@@ -115,7 +115,7 @@ all: busybox busybox.links doc
all_tree: $(ALL_MAKEFILES)
$(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile
- d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@
+ [ -d $(@D) ] || mkdir -p $(@D); cp $< $@
# In this section, we need .config
-include $(top_builddir)/.config.cmd
@@ -219,7 +219,8 @@ include/bb_config.h: include/config.h
echo "#endif" >> $@
include/bbconfigopts.h: .config
- scripts/config/mkconfigs >include/bbconfigopts.h
+ @[ -d $(@D) ] || mkdir -v $(@D)
+ $(top_srcdir)/scripts/config/mkconfigs >include/bbconfigopts.h
finished2:
$(SECHO)
@@ -233,16 +234,13 @@ all: menuconfig
# configuration
# ---------------------------------------------------------------------------
-$(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile
- d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@
-
-scripts/config/conf: scripts/config/Makefile Rules.mak
+scripts/config/conf: scripts/config/Makefile $(top_srcdir)/Rules.mak
$(MAKE) -C scripts/config conf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
fi
-scripts/config/mconf: scripts/config/Makefile Rules.mak
+scripts/config/mconf: scripts/config/Makefile $(top_srcdir)/Rules.mak
$(MAKE) -C scripts/config ncurses conf mconf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \