X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile;h=14f5cd14920714bd52e52adb2e44626748c2d4a9;hb=765b0eed3ef29a80115708c3249d3a541509cd24;hp=3a9630a4fe576c484e894a6ddcbe66ed89caf14b;hpb=dabe36e4a010f0dbcec4116016376d4e82e85d2f;p=oweals%2Fbusybox.git diff --git a/Makefile b/Makefile index 3a9630a4f..14f5cd149 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 1 -PATCHLEVEL = 11 +PATCHLEVEL = 17 SUBLEVEL = 0 -EXTRAVERSION = +EXTRAVERSION = .git NAME = Unnamed # *DOCUMENTATION* @@ -168,6 +168,7 @@ ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(shell grep ^CONFIG_CROSS_COMPILER_PREFIX .config 2>/dev/null) CROSS_COMPILE := $(subst CONFIG_CROSS_COMPILER_PREFIX=,,$(CROSS_COMPILE)) CROSS_COMPILE := $(subst ",,$(CROSS_COMPILE)) +#") endif # SUBARCH tells the usermode build what the underlying arch is. That is set @@ -357,6 +358,15 @@ scripts_basic: # To avoid any implicit rule to kick in, define an empty command. scripts/basic/%: scripts_basic ; +# bbox: we have helpers in applets/ +# we depend on scripts_basic, since scripts/basic/fixdep +# must be built before any other host prog +PHONY += applets_dir +applets_dir: scripts_basic + $(Q)$(MAKE) $(build)=applets + +applets/%: applets_dir ; + PHONY += outputmakefile # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the @@ -367,6 +377,11 @@ ifneq ($(KBUILD_SRC),) $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) endif +# This target generates Kbuild's and Config.in's from *.c files +PHONY += gen_build_files +gen_build_files: + $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree) + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to scripts/kconfig/Makefile # It is allowed to specify more targets when calling make, including @@ -418,7 +433,7 @@ ifeq ($(config-targets),1) -include $(srctree)/arch/$(ARCH)/Makefile export KBUILD_DEFCONFIG -config %config: scripts_basic outputmakefile FORCE +config %config: scripts_basic outputmakefile gen_build_files FORCE $(Q)mkdir -p include $(Q)$(MAKE) $(build)=scripts/kconfig $@ $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease @@ -433,7 +448,7 @@ ifeq ($(KBUILD_EXTMOD),) # Carefully list dependencies so we do not try to build scripts twice # in parrallel PHONY += scripts -scripts: scripts_basic include/config/MARKER +scripts: gen_build_files scripts_basic include/config/MARKER $(Q)$(MAKE) $(build)=$(@) scripts_basic: include/autoconf.h @@ -456,6 +471,7 @@ libs-y := \ libbb/ \ libpwdgrp/ \ loginutils/ \ + mailutils/ \ miscutils/ \ modutils/ \ networking/ \ @@ -505,7 +521,7 @@ endif # command line. # This allow a user to issue only 'make' to build a kernel including modules # Defaults busybox but it is usually overridden in the arch makefile -all: busybox +all: busybox doc -include $(srctree)/arch/$(ARCH)/Makefile @@ -795,7 +811,7 @@ ifneq ($(KBUILD_MODULES),) $(Q)rm -f $(MODVERDIR)/* endif -archprepare: prepare1 scripts_basic +archprepare: prepare1 scripts_basic applets_dir prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. @@ -932,8 +948,9 @@ endif # CONFIG_MODULES # make distclean Remove editor backup files, patch leftover files and the like # Directories & files removed with 'make clean' -CLEAN_DIRS += $(MODVERDIR) -CLEAN_FILES += busybox busybox_unstripped* System.map .kernelrelease \ +CLEAN_DIRS += $(MODVERDIR) _install 0_lib +CLEAN_FILES += busybox busybox_unstripped* busybox.links \ + System.map .kernelrelease \ .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map # Directories & files removed with 'make mrproper' @@ -944,7 +961,8 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \ include/usage_compressed.h \ include/applet_tables.h \ applets/usage \ - .kernelrelease Module.symvers tags TAGS cscope* + .kernelrelease Module.symvers tags TAGS cscope* \ + busybox_old # clean - Delete most, but leave enough to build external modules # @@ -960,10 +978,16 @@ clean: archclean $(clean-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f +PHONY += doc-clean +doc-clean: rm-files := docs/busybox.pod \ + docs/BusyBox.html docs/BusyBox.1 docs/BusyBox.txt +doc-clean: + $(call cmd,rmfiles) + # mrproper - Delete all generated files, including .config # mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) @@ -977,6 +1001,8 @@ $(mrproper-dirs): mrproper: clean archmrproper $(mrproper-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) + @find -name Config.src | sed 's/.src$/.in/' | xargs -r rm -f + @find -name Kbuild.src | sed 's/.src$//' | xargs -r rm -f # distclean # @@ -984,9 +1010,9 @@ PHONY += distclean distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \ + -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f @@ -1090,7 +1116,7 @@ clean: rm-dirs := $(MODVERDIR) clean: $(clean-dirs) $(call cmd,rmdirs) @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f