summaryrefslogtreecommitdiff
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 17:11:08 (GMT)
committer Denis Vlasenko <vda.linux@googlemail.com>2006-10-05 17:11:08 (GMT)
commit1868409c86c7fbd46377a7842160e164c2c4ba49 (patch)
tree920f2148e63a3e4dd722c1b27b2fe9e200d9382e
parent5d2f1736d9bdc2ac0d47000ed0ce403b9f06f6fb (diff)
downloadbusybox-1868409c86c7fbd46377a7842160e164c2c4ba49.zip
busybox-1868409c86c7fbd46377a7842160e164c2c4ba49.tar.gz
busybox-1868409c86c7fbd46377a7842160e164c2c4ba49.tar.bz2
fixing build system overhaul fallout...
Diffstat
-rw-r--r--Makefile6
-rw-r--r--Makefile.custom2
-rw-r--r--include/bb_config.h6
-rwxr-xr-xscripts/mkmakefile36
4 files changed, 46 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4b49208..d85eb8a 100644
--- a/Makefile
+++ b/Makefile
@@ -565,7 +565,7 @@ busybox-all := $(core-y) $(libs-y)
# Rule to link busybox - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_busybox__ ?= LINK $@
- cmd_busybox__ ?= scripts/trylink $(CC) -o $@ \
+ cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $(busybox-all) -Wl,--end-group \
@@ -798,10 +798,10 @@ include/config/MARKER: scripts/basic/split-include include/autoconf.h
@echo ' SPLIT include/autoconf.h -> include/config/*'
@scripts/basic/split-include include/autoconf.h include/config
@echo ' GEN include/bbconfigopts.h'
- @scripts/mkconfigs >include/bbconfigopts.h
+ @$(srctree)/scripts/mkconfigs >include/bbconfigopts.h
@$(MAKE) $(build)=scripts
@echo ' GEN include/usage_compressed.h'
- @scripts/usage_compressed include/usage_compressed.h scripts
+ @$(srctree)/scripts/usage_compressed include/usage_compressed.h scripts
@touch $@
# Generate some files
diff --git a/Makefile.custom b/Makefile.custom
index 6880b97..c0984e1 100644
--- a/Makefile.custom
+++ b/Makefile.custom
@@ -78,7 +78,7 @@ baseline: busybox_unstripped
.PHONY: objsizes
objsizes: busybox_unstripped
- $(SHELL) $(srctree)/scripts/objsizes
+ $(srctree)/scripts/objsizes
# Documentation Targets
.PHONY: doc
diff --git a/include/bb_config.h b/include/bb_config.h
index beec07c..1f96026 100644
--- a/include/bb_config.h
+++ b/include/bb_config.h
@@ -2,6 +2,12 @@
* which depend on other symbols, which themself are off.
* Provide them here by hand. Need a better idea. */
+#ifndef ENABLE_FEATURE_GUNZIP_UNCOMPRESS
+#define ENABLE_FEATURE_GUNZIP_UNCOMPRESS 0
+#define USE_FEATURE_GUNZIP_UNCOMPRESS(...)
+#define SKIP_FEATURE_GUNZIP_UNCOMPRESS(...) __VA_ARGS__
+#endif
+
#ifndef ENABLE_KILLALL5
#define ENABLE_KILLALL5 0
#define USE_KILLALL5(...)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
new file mode 100755
index 0000000..7f9d544
--- a/dev/null
+++ b/scripts/mkmakefile
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Generates a small Makefile used in the root of the output
+# directory, to allow make to be started from there.
+# The Makefile also allow for more convinient build of external modules
+
+# Usage
+# $1 - Kernel src directory
+# $2 - Output directory
+# $3 - version
+# $4 - patchlevel
+
+
+test ! -r $2/Makefile -o -O $2/Makefile || exit 0
+echo " GEN $2/Makefile"
+
+cat << EOF > $2/Makefile
+# Automatically generated by $0: don't edit
+
+VERSION = $3
+PATCHLEVEL = $4
+
+KERNELSRC := $1
+KERNELOUTPUT := $2
+
+MAKEFLAGS += --no-print-directory
+
+.PHONY: all \$(MAKECMDGOALS)
+
+all:
+ \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+
+Makefile:;
+
+\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
+ \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+EOF