--- trunk/mkinitrd-magellan/busybox/Makefile.custom 2009/04/24 18:32:46 815 +++ trunk/mkinitrd-magellan/busybox/Makefile.custom 2009/04/24 18:33:46 816 @@ -2,9 +2,6 @@ # Build system # ========================================================================== -%.bflt: %_unstripped - $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@ - busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h $(Q)-$(SHELL) $^ >$@ @@ -15,6 +12,17 @@ ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y) INSTALL_OPTS:= --hardlinks endif +ifeq ($(CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS),y) +ifeq ($(CONFIG_INSTALL_SH_APPLET_SYMLINK),y) +INSTALL_OPTS:= --sw-sh-sym +endif +ifeq ($(CONFIG_INSTALL_SH_APPLET_HARDLINK),y) +INSTALL_OPTS:= --sw-sh-hard +endif +ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y) +INSTALL_OPTS:= --scriptwrapper +endif +endif install: $(srctree)/applets/install.sh busybox busybox.links $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \ $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS) @@ -38,15 +46,20 @@ done endif +# Not very elegant: copies testsuite to objdir... +# (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be)) +.PHONY: check +.PHONY: test check test: busybox busybox.links - bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \ - $(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v) + 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)" .PHONY: release release: distclean cd ..; \ rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \ - cp -a busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ + cp -pPR busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ -name .svn \ -print \ @@ -70,6 +83,7 @@ .PHONY: bloatcheck bloatcheck: busybox_old busybox_unstripped @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped + @$(CROSS_COMPILE)size busybox_old busybox_unstripped .PHONY: baseline baseline: busybox_unstripped @@ -79,14 +93,22 @@ objsizes: busybox_unstripped $(srctree)/scripts/objsizes +.PHONY: stksizes +stksizes: busybox_unstripped + $(CROSS_COMPILE)objdump -d busybox_unstripped | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq + .PHONY: bigdata bigdata: busybox_unstripped - nm --size-sort busybox_unstripped | grep -vi ' [tr] ' | tail -20 + $(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [trw] ' # Documentation Targets .PHONY: doc doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html +# FIXME: Doesn't belong here +disp_doc = \ + @$(if $(quiet),echo " DOC $(@F)") + docs/busybox.pod: $(srctree)/docs/busybox_header.pod \ $(srctree)/include/usage.h \ $(srctree)/docs/busybox_footer.pod \ @@ -143,3 +165,5 @@ .PHONY: html html: $(syn) synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^ + +-include $(srctree)/Makefile.local