X-Git-Url: https://git.librecmc.org/?p=oweals%2Fbusybox.git;a=blobdiff_plain;f=Makefile.custom;h=6f679c4e12b4cb7bc139104aa321f035db387261;hp=b0ef056274e4cb61dbe8a485c00328eeadde56ac;hb=16bcd504a32e6a7bf2015ffb241133f9ead6100b;hpb=acabf8fcb86302e55e01f0a20d5ff9914791416a diff --git a/Makefile.custom b/Makefile.custom index b0ef05627..6f679c4e1 100644 --- a/Makefile.custom +++ b/Makefile.custom @@ -2,10 +2,18 @@ # Build system # ========================================================================== -busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h - $(Q)-$(SHELL) $^ >$@ +busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h + $(Q)-$(SHELL) $^ > $@ + +busybox.cfg.suid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h + $(Q)-SUID="yes" $(SHELL) $^ > $@ +busybox.cfg.nosuid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h + $(Q)-SUID="DROP" $(SHELL) $^ > $@ .PHONY: install +ifeq ($(CONFIG_INSTALL_APPLET_DONT),y) +INSTALL_OPTS:= --none +endif ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y) INSTALL_OPTS:= --symlinks endif @@ -23,6 +31,10 @@ ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y) INSTALL_OPTS:= --scriptwrapper endif endif +ifeq ($(CONFIG_FEATURE_INDIVIDUAL),y) +INSTALL_OPTS:= --binaries +LIBBUSYBOX_SONAME:= 0_lib/libbusybox.so.$(BB_VER) +endif install: $(srctree)/applets/install.sh busybox busybox.links $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \ $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS) @@ -37,6 +49,9 @@ ifeq ($(strip $(CONFIG_FEATURE_SUID)),y) @echo endif +install-noclobber: INSTALL_OPTS+=--noclobber +install-noclobber: install + uninstall: busybox.links rm -f $(CONFIG_PREFIX)/bin/busybox for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done @@ -50,7 +65,11 @@ endif # (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be)) .PHONY: check .PHONY: test +ifeq ($(CONFIG_UNIT_TEST),y) +UNIT_CMD = ./busybox unit +endif check test: busybox busybox.links + $(UNIT_CMD) test -d $(objtree)/testsuite || cp -pPR $(srctree)/testsuite $(objtree) bindir=$(objtree) srcdir=$(srctree)/testsuite \ $(SHELL) -c "cd $(objtree)/testsuite && $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)" @@ -64,6 +83,14 @@ release: distclean -name .svn \ -print \ -exec rm -r -f {} \; ; \ + find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ + -name .git \ + -print \ + -exec rm -r -f {} \; ; \ + find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type f \ + -name .gitignore \ + -print \ + -exec rm -f {} \; ; \ find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type f \ -name .\#* \ -print \ @@ -103,7 +130,7 @@ bigdata: busybox_unstripped # Documentation Targets .PHONY: doc -doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html +doc: docs/busybox.pod docs/BusyBox.txt docs/busybox.1 docs/BusyBox.html # FIXME: Doesn't belong here cmd_doc = @@ -114,13 +141,14 @@ disp_doc = $($(quiet)cmd_doc) # sed adds newlines after "Options:" etc, # this is needed in order to get good BusyBox.{1,txt,html} docs/busybox.pod: $(srctree)/docs/busybox_header.pod \ - $(srctree)/include/usage.h \ + include/usage.h \ $(srctree)/docs/busybox_footer.pod \ applets/usage_pod $(disp_doc) $(Q)-mkdir -p docs $(Q)-( \ cat $(srctree)/docs/busybox_header.pod; \ + echo; \ applets/usage_pod | sed 's/^[A-Za-z][A-Za-z ]*[a-z]:$$/&\n/'; \ cat $(srctree)/docs/busybox_footer.pod; \ ) > docs/busybox.pod @@ -130,10 +158,10 @@ docs/BusyBox.txt: docs/busybox.pod $(Q)-mkdir -p docs $(Q)-pod2text $< > $@ -docs/BusyBox.1: docs/busybox.pod +docs/busybox.1: docs/busybox.pod $(disp_doc) $(Q)-mkdir -p docs - $(Q)-pod2man --center=BusyBox --release="version $(VERSION)" $< > $@ + $(Q)-pod2man --center=busybox --release="version $(KERNELVERSION)" $< > $@ docs/BusyBox.html: docs/busybox.net/BusyBox.html $(disp_doc)