Magellan Linux

Diff of /tags/mkinitrd-6_3_2/busybox/Makefile.custom

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 2  Line 2 
2  # Build system  # Build system
3  # ==========================================================================  # ==========================================================================
4    
5  %.bflt: %_unstripped  busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h
  $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@  
   
 busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h  
6   $(Q)-$(SHELL) $^ >$@   $(Q)-$(SHELL) $^ >$@
7    
8  .PHONY: install  .PHONY: install
# Line 15  endif Line 12  endif
12  ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y)  ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y)
13  INSTALL_OPTS:= --hardlinks  INSTALL_OPTS:= --hardlinks
14  endif  endif
15    ifeq ($(CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS),y)
16    ifeq ($(CONFIG_INSTALL_SH_APPLET_SYMLINK),y)
17    INSTALL_OPTS:= --sw-sh-sym
18    endif
19    ifeq ($(CONFIG_INSTALL_SH_APPLET_HARDLINK),y)
20    INSTALL_OPTS:= --sw-sh-hard
21    endif
22    ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y)
23    INSTALL_OPTS:= --scriptwrapper
24    endif
25    endif
26  install: $(srctree)/applets/install.sh busybox busybox.links  install: $(srctree)/applets/install.sh busybox busybox.links
27   $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \   $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
28   $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)   $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)
# Line 38  ifneq ($(strip $(DO_INSTALL_LIBS)),n) Line 46  ifneq ($(strip $(DO_INSTALL_LIBS)),n)
46   done   done
47  endif  endif
48    
49    # Not very elegant: copies testsuite to objdir...
50    # (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be))
51    .PHONY: check
52    .PHONY: test
53  check test: busybox busybox.links  check test: busybox busybox.links
54   bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \   test -d $(objtree)/testsuite || cp -pPR $(srctree)/testsuite $(objtree)
55   $(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)   bindir=$(objtree) srcdir=$(srctree)/testsuite \
56     $(SHELL) -c "cd $(objtree)/testsuite && $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)"
57    
58  .PHONY: release  .PHONY: release
59  release: distclean  release: distclean
60   cd ..; \   cd ..; \
61   rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \   rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \
62   cp -a busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \   cp -pPR busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \
63   find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \   find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \
64   -name .svn \   -name .svn \
65   -print \   -print \
66   -exec rm -r -f {} \; ; \   -exec rm -r -f {} \; ; \
67     find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \
68     -name .git \
69     -print \
70     -exec rm -r -f {} \; ; \
71   find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type f \   find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type f \
72   -name .\#* \   -name .\#* \
73   -print \   -print \
# Line 70  sizes: busybox_unstripped Line 87  sizes: busybox_unstripped
87  .PHONY: bloatcheck  .PHONY: bloatcheck
88  bloatcheck: busybox_old busybox_unstripped  bloatcheck: busybox_old busybox_unstripped
89   @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped   @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped
90     @$(CROSS_COMPILE)size busybox_old busybox_unstripped
91    
92  .PHONY: baseline  .PHONY: baseline
93  baseline: busybox_unstripped  baseline: busybox_unstripped
# Line 79  baseline: busybox_unstripped Line 97  baseline: busybox_unstripped
97  objsizes: busybox_unstripped  objsizes: busybox_unstripped
98   $(srctree)/scripts/objsizes   $(srctree)/scripts/objsizes
99    
100    .PHONY: stksizes
101    stksizes: busybox_unstripped
102     $(CROSS_COMPILE)objdump -d busybox_unstripped | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq
103    
104  .PHONY: bigdata  .PHONY: bigdata
105  bigdata: busybox_unstripped  bigdata: busybox_unstripped
106   nm --size-sort busybox_unstripped | grep -vi ' [tr] ' | tail -20   $(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [trw] '
107    
108  # Documentation Targets  # Documentation Targets
109  .PHONY: doc  .PHONY: doc
110  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
111    
112    # FIXME: Doesn't belong here
113           cmd_doc =
114     quiet_cmd_doc = $(Q)echo "  DOC     $(@F)"
115    silent_cmd_doc =
116    disp_doc       = $($(quiet)cmd_doc)
117    
118    # sed adds newlines after "Options:" etc,
119    # this is needed in order to get good BusyBox.{1,txt,html}
120  docs/busybox.pod: $(srctree)/docs/busybox_header.pod \  docs/busybox.pod: $(srctree)/docs/busybox_header.pod \
121   $(srctree)/include/usage.h \   include/usage.h \
122   $(srctree)/docs/busybox_footer.pod \   $(srctree)/docs/busybox_footer.pod \
123   $(srctree)/docs/autodocifier.pl   applets/usage_pod
124   $(disp_doc)   $(disp_doc)
125   $(Q)-mkdir -p docs   $(Q)-mkdir -p docs
126   $(Q)-( cat $(srctree)/docs/busybox_header.pod ; \   $(Q)-( \
127      $(srctree)/docs/autodocifier.pl $(srctree)/include/usage.h ; \      cat $(srctree)/docs/busybox_header.pod; \
128      cat $(srctree)/docs/busybox_footer.pod ; ) > docs/busybox.pod      applets/usage_pod | sed 's/^[A-Za-z][A-Za-z ]*[a-z]:$$/&\n/'; \
129        cat $(srctree)/docs/busybox_footer.pod; \
130        ) > docs/busybox.pod
131    
132  docs/BusyBox.txt: docs/busybox.pod  docs/BusyBox.txt: docs/busybox.pod
133   $(disp_doc)   $(disp_doc)
# Line 105  docs/BusyBox.txt: docs/busybox.pod Line 137  docs/BusyBox.txt: docs/busybox.pod
137  docs/BusyBox.1: docs/busybox.pod  docs/BusyBox.1: docs/busybox.pod
138   $(disp_doc)   $(disp_doc)
139   $(Q)-mkdir -p docs   $(Q)-mkdir -p docs
140   $(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \   $(Q)-pod2man --center=BusyBox --release="version $(KERNELVERSION)" $< > $@
  $< > $@  
141    
142  docs/BusyBox.html: docs/busybox.net/BusyBox.html  docs/BusyBox.html: docs/busybox.net/BusyBox.html
143   $(disp_doc)   $(disp_doc)
# Line 116  docs/BusyBox.html: docs/busybox.net/Busy Line 147  docs/BusyBox.html: docs/busybox.net/Busy
147    
148  docs/busybox.net/BusyBox.html: docs/busybox.pod  docs/busybox.net/BusyBox.html: docs/busybox.pod
149   $(Q)-mkdir -p docs/busybox.net   $(Q)-mkdir -p docs/busybox.net
150   $(Q)-pod2html --noindex $< > \   $(Q)-pod2html --noindex $< > $@
     docs/busybox.net/BusyBox.html  
151   $(Q)-rm -f pod2htm*   $(Q)-rm -f pod2htm*
152    
153  # documentation, cross-reference  # documentation, cross-reference
# Line 143  SYN_CPPFLAGS := $(subst $(brace_close),\ Line 173  SYN_CPPFLAGS := $(subst $(brace_close),\
173  .PHONY: html  .PHONY: html
174  html: $(syn)  html: $(syn)
175   synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^   synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^
176    
177    -include $(srctree)/Makefile.local

Legend:
Removed from v.532  
changed lines
  Added in v.1123