+ wrap things in B<> to make pod2man happy
[oweals/busybox.git] / Makefile
index 8a71beb9438d7c15c81c743831ee28c13becad1b..54db45c9b31b5f35519f9559f92610a3e9ecc0a5 100644 (file)
--- a/Makefile
+++ b/Makefile
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
-PROG      := busybox
+PROG      := busybox
 VERSION   := 0.43
-BUILDTIME := $(shell TZ=GMT date "+%Y%m%d-%H%M")
+BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
+export VERSION
 
 # Set the following to `true' to make a debuggable build.
 # Leave this set to `false' for production use.
 # eg: `make DODEBUG=true tests'
 DODEBUG = false
 
-# If you want a static binary, turn this on.  I can't think
-# of many situations where anybody would ever want it static, 
-# but...
+# If you want a static binary, turn this on.
 DOSTATIC = false
 
 # This will choke on a non-debian system
@@ -72,12 +71,12 @@ endif
 # -D_GNU_SOURCE is needed because environ is used in init.c
 ifeq ($(DODEBUG),true)
     CFLAGS += -Wall -g -D_GNU_SOURCE
-    LDFLAGS =
+    LDFLAGS = 
     STRIP   =
 else
     CFLAGS  += -Wall $(OPTIMIZATION) -fomit-frame-pointer -fno-builtin -D_GNU_SOURCE
     LDFLAGS  = -s
-    STRIP    = $(STRIPTOOL) --remove-section=.note --remove-section=.comment
+    STRIP    = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
     #Only staticly link when _not_ debugging 
     ifeq ($(DOSTATIC),true)
        LDFLAGS += --static
@@ -96,16 +95,19 @@ ifdef BB_INIT_SCRIPT
     CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
 endif
 
-all: busybox busybox.links
+all: busybox busybox.links docs
 .PHONY: all
 
 busybox: $(OBJECTS)
        $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
-       $(STRIP) $@
+       $(STRIP)
 
 busybox.links: busybox.def.h
        - ./busybox.mkll | sort >$@
 
+docs:  docs/busybox.pod
+       cd docs && $(MAKE) clean all 
+
 regexp.o nfsmount.o: %.o: %.h
 $(OBJECTS): %.o: busybox.def.h internal.h  %.c
 
@@ -130,6 +132,7 @@ install: busybox busybox.links
 
 .PHONY: dist release
 dist release: distclean
+       $(MAKE) -C docs clean all 
        cd ..;                                  \
        rm -rf busybox-$(VERSION);              \
        cp -a busybox busybox-$(VERSION);       \