mkfs_vfat: fixes for large image cases
[oweals/busybox.git] / Makefile.custom
index e4a616f65ab95719a9d46c1d86b8bbe29b982c9b..fb9ec671ca7f73413c2cdc263963c4390db12371 100644 (file)
@@ -47,10 +47,11 @@ ifneq ($(strip $(DO_INSTALL_LIBS)),n)
 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
-       test -d $(objtree)/testsuite || cp -a $(srctree)/testsuite $(objtree)
+       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)"
 
@@ -58,7 +59,7 @@ check test: busybox busybox.links
 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 \
@@ -98,21 +99,31 @@ stksizes: busybox_unstripped
 
 .PHONY: bigdata
 bigdata: busybox_unstripped
-       $(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [tr] '
+       $(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
+       cmd_doc =
+ quiet_cmd_doc = $(Q)echo "  DOC     $(@F)"
+silent_cmd_doc =
+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 \
                $(srctree)/docs/busybox_footer.pod \
-               $(srctree)/docs/autodocifier.pl
+               applets/usage_pod
        $(disp_doc)
        $(Q)-mkdir -p docs
-       $(Q)-( cat $(srctree)/docs/busybox_header.pod ; \
-           $(srctree)/docs/autodocifier.pl $(srctree)/include/usage.h ; \
-           cat $(srctree)/docs/busybox_footer.pod ; ) > docs/busybox.pod
+       $(Q)-( \
+           cat $(srctree)/docs/busybox_header.pod; \
+           applets/usage_pod | sed 's/^[A-Za-z][A-Za-z ]*[a-z]:$$/&\n/'; \
+           cat $(srctree)/docs/busybox_footer.pod; \
+           ) > docs/busybox.pod
 
 docs/BusyBox.txt: docs/busybox.pod
        $(disp_doc)
@@ -122,8 +133,7 @@ docs/BusyBox.txt: 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)
@@ -133,8 +143,7 @@ docs/BusyBox.html: docs/busybox.net/BusyBox.html
 
 docs/busybox.net/BusyBox.html: docs/busybox.pod
        $(Q)-mkdir -p docs/busybox.net
-       $(Q)-pod2html --noindex $< > \
-           docs/busybox.net/BusyBox.html
+       $(Q)-pod2html --noindex $< > $@
        $(Q)-rm -f pod2htm*
 
 # documentation, cross-reference