Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Makefile.housekeeping 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. # -*- makefile -*- : Force emacs to use Makefile mode
  2. # This file contains various boring housekeeping functions that would
  3. # otherwise seriously clutter up the main Makefile.
  4. # Objects to be removed by "make clean"
  5. #
  6. CLEANUP := $(BIN)/*.* # *.* to avoid catching the "CVS" directory
  7. # Version number calculations
  8. #
  9. VERSION_MAJOR = 0
  10. VERSION_MINOR = 5
  11. VERSION_PATCH = 1
  12. EXTRAVERSION =
  13. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  14. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  15. CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
  16. -DVERSION_MINOR=$(VERSION_MINOR) \
  17. -DVERSION=\"$(VERSION)\"
  18. IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
  19. version :
  20. @echo $(VERSION)
  21. # Check for tools that can cause failed builds
  22. #
  23. .toolcheck : Makefile Config
  24. @if $(CC) -v 2>&1 | grep -is 'gcc version 2\.96' > /dev/null; then \
  25. echo 'gcc 2.96 is unsuitable for compiling Etherboot'; \
  26. echo 'Use gcc 2.95 or gcc 3.x instead'; \
  27. exit 1; \
  28. fi
  29. @if [ `perl -e 'use bytes; print chr(255)' | wc -c` = 2 ]; then \
  30. echo 'Your Perl version has a Unicode handling bug'; \
  31. echo 'Execute this command before compiling Etherboot:'; \
  32. echo 'export LANG=$${LANG%.UTF-8}'; \
  33. exit 1; \
  34. fi
  35. @$(TOUCH) $@
  36. VERYCLEANUP += .toolcheck
  37. # Build verbosity
  38. #
  39. ifeq ($(V),1)
  40. Q =
  41. QM = @\#
  42. else
  43. Q = @
  44. QM = @
  45. endif
  46. # Check for an old version of gas (binutils 2.9.1)
  47. #
  48. OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
  49. CFLAGS += $(OLDGAS)
  50. oldgas :
  51. @echo $(oldgas)
  52. # compiler.h is needed for our linking and debugging system
  53. #
  54. CFLAGS += -include compiler.h
  55. # config/%.h files are generated from config.h using mkconfig.pl
  56. config/%.h : config.h
  57. $(MKCONFIG) $<
  58. CLEANUP += config/*.h
  59. # SRCDIRS lists all directories containing source files.
  60. srcdirs :
  61. @echo $(SRCDIRS)
  62. # SRCS lists all .c or .S files found in any SRCDIR
  63. #
  64. SRCS += $(wildcard $(patsubst %,%/*.c,$(SRCDIRS)))
  65. SRCS += $(wildcard $(patsubst %,%/*.S,$(SRCDIRS)))
  66. srcs :
  67. @echo $(SRCS)
  68. # AUTO_SRCS lists all files in SRCS that are not mentioned in
  69. # NON_AUTO_SRCS. Files should be added to NON_AUTO_SRCS if they
  70. # cannot be built using the standard build template.
  71. #
  72. AUTO_SRCS = $(filter-out $(NON_AUTO_SRCS),$(SRCS))
  73. autosrcs :
  74. @echo $(AUTO_SRCS)
  75. # We automatically generate rules for any file mentioned in AUTO_SRCS
  76. # using the following set of templates. It would be cleaner to use
  77. # $(eval ...), but this function exists only in GNU make >= 3.80.
  78. # src_template : generate Makefile rules for a given source file
  79. #
  80. # $(1) is the full path to the source file (e.g. "drivers/net/rtl8139.c")
  81. # $(2) is the full path to the .d file (e.g. "bin/deps/drivers/net/rtl8139.d")
  82. # $(3) is the source type (e.g. "c")
  83. # $(4) is the source base name (e.g. "rtl8139")
  84. #
  85. define src_template
  86. @echo "Generating Makefile rules for $(1)"
  87. @$(MKDIR) -p $(dir $(2))
  88. @$(RM) $(2)
  89. @$(TOUCH) $(2)
  90. $(foreach OBJ,$(if $(OBJS_$(4)),$(OBJS_$(4)),$(4)), \
  91. $(call obj_template,$(1),$(2),$(3),$(OBJ)))
  92. @$(PARSEROM) $(1) >> $(2)
  93. endef
  94. # obj_template : generate Makefile rules for a given resultant object
  95. # of a particular source file. (We can have multiple objects per
  96. # source file via the OBJS_xxx list.)
  97. #
  98. # $(1) is the full path to the source file (e.g. "drivers/net/rtl8139.c")
  99. # $(2) is the full path to the .d file (e.g. "bin/deps/drivers/net/rtl8139.d")
  100. # $(3) is the source type (e.g. "c")
  101. # $(4) is the object name (e.g. "rtl8139")
  102. #
  103. define obj_template
  104. @$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
  105. -M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
  106. @echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
  107. '\n\t$$(QM)echo " [BUILD] $$@"\n' \
  108. '\n\t$$(RULE_$(3))\n' \
  109. '\nBOBJS += $$(BIN)/$(4).o\n' \
  110. $(foreach TGT,$(DEBUG_TARGETS), \
  111. $(if $(RULE_$(3)_to_$(TGT)), \
  112. '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
  113. '\n\t$$(QM)echo " [BUILD] $$@"\n' \
  114. '\n\t$$(RULE_$(3)_to_$(TGT))\n' \
  115. '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
  116. '\n$(2) : $$($(4)_DEPS)\n' \
  117. '\nTAGS : $$($(4)_DEPS)\n' \
  118. >> $(2)
  119. endef
  120. # Rule to generate the Makefile rules files to be included
  121. #
  122. $(BIN)/deps/%.d : % $(MAKEDEPS) $(PARSEROM)
  123. $(if $(filter $(AUTO_SRCS),$<),$(call src_template,$<,$@,$(subst .,,$(suffix $<)),$(basename $(notdir $<))),@echo 'ERROR: $< is not an AUTO_SRC' ; exit 1)
  124. # Calculate and include the list of Makefile rules files
  125. #
  126. AUTO_DEPS = $(patsubst %,$(BIN)/deps/%.d,$(AUTO_SRCS))
  127. include $(AUTO_DEPS)
  128. autodeps :
  129. @echo $(AUTO_DEPS)
  130. VERYCLEANUP += $(BIN)/deps
  131. # The following variables are created by the Makefile rules files
  132. #
  133. bobjs :
  134. @echo $(BOBJS)
  135. drivers :
  136. @echo $(DRIVERS)
  137. .PHONY : drivers
  138. roms :
  139. @echo $(ROMS)
  140. # Generate the NIC file from the parsed source files. The NIC file is
  141. # only for rom-o-matic.
  142. #
  143. $(BIN)/NIC : $(AUTO_DEPS)
  144. @echo '# This is an automatically generated file, do not edit' > $@
  145. @echo '# It does not affect anything in the build, ' \
  146. 'it is only for rom-o-matic' >> $@
  147. @echo >> $@
  148. @perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
  149. CLEANUP += $(BIN)/NIC
  150. # Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and
  151. # derive the variables:
  152. #
  153. # TGT_ELEMENTS : the elements of the target (e.g. "dfe538 prism2_pci")
  154. # TGT_PREFIX : the prefix type (e.g. "zrom")
  155. # TGT_DRIVERS : the driver for each element (e.g. "rtl8139 prism2_pci")
  156. # TGT_ROM_NAME : the ROM name (e.g. "dfe538")
  157. # TGT_MEDIA : the media type (e.g. "rom")
  158. #
  159. DRIVERS_etherboot = $(DRIVERS)
  160. CARD_DRIVER = $(firstword $(DRIVER_$(1)) $(1))
  161. TGT_ELEMENTS = $(subst --, ,$(firstword $(subst ., ,$(notdir $@))))
  162. TGT_PREFIX = $(word 2,$(subst ., ,$(notdir $@)))
  163. TGT_ROM_NAME = $(firstword $(TGT_ELEMENTS))
  164. TGT_DRIVERS = $(strip $(if $(DRIVERS_$(TGT_ROM_NAME)), \
  165. $(DRIVERS_$(TGT_ROM_NAME)), \
  166. $(foreach TGT_ELEMENT,$(TGT_ELEMENTS), \
  167. $(call CARD_DRIVER,$(TGT_ELEMENT))) ))
  168. TGT_MEDIA = $(subst z,,$(TGT_PREFIX))
  169. # Look up ROM IDs for the current target
  170. # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
  171. #
  172. # TGT_PCI_VENDOR : the PCI vendor ID (e.g. "0x1186")
  173. # TGT_PCI_DEVICE : the PCI device ID (e.g. "0x1300")
  174. #
  175. TGT_PCI_VENDOR = $(PCI_VENDOR_$(TGT_ROM_NAME))
  176. TGT_PCI_DEVICE = $(PCI_DEVICE_$(TGT_ROM_NAME))
  177. # Calculate link-time options for the current target
  178. # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
  179. #
  180. # TGT_LD_DRIVERS : symbols to require in order to drag in the relevant drivers
  181. # (e.g. "obj_rtl8139 obj_prism2_pci")
  182. # TGT_LD_IDS : symbols to define in order to fill in ID structures in the
  183. # ROM header (e.g."pci_vendor_id=0x1186 pci_device_id=0x1300")
  184. #
  185. TGT_LD_DRIVERS = $(subst -,_,$(patsubst %,obj_%,$(TGT_DRIVERS)))
  186. TGT_LD_PREFIX = obj_$(TGT_PREFIX)prefix
  187. TGT_LD_IDS = $(if $(TGT_PCI_VENDOR),pci_vendor_id=$(TGT_PCI_VENDOR)) \
  188. $(if $(TGT_PCI_DEVICE),pci_device_id=$(TGT_PCI_DEVICE))
  189. # Calculate linker flags based on link-time options for the current
  190. # target type (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the
  191. # variables:
  192. #
  193. # TGT_LD_FLAGS : target-specific flags to pass to linker (e.g.
  194. # "-u obj_zpciprefix -u obj_rtl8139 -u obj_prism2_pci
  195. # --defsym pci_vendor=0x1186 --defsym pci_device=0x1300")
  196. #
  197. TGT_LD_FLAGS = $(foreach SYM,$(TGT_LD_PREFIX) $(TGT_LD_DRIVERS) obj_config,\
  198. -u $(SYM) --defsym check_$(SYM)=$(SYM) ) \
  199. $(patsubst %,--defsym %,$(TGT_LD_IDS))
  200. # Calculate makerom flags for the specific target
  201. # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
  202. #
  203. # TGT_MAKEROM_FLAGS : target-specific flags for makerom (e.g.
  204. # "-p 0x1186,0x1300")
  205. #
  206. TGT_MAKEROM_FLAGS = $(strip $(MAKEROM_FLAGS_$(TGT_ROM_NAME)) \
  207. $(if $(TGT_PCI_VENDOR),$(strip -p $(TGT_PCI_VENDOR),$(TGT_PCI_DEVICE))))
  208. # Calculate list of debugging versions of objects to be included in
  209. # the target.
  210. #
  211. COMMA := ,
  212. DEBUG_LIST = $(subst $(COMMA), ,$(DEBUG))
  213. DEBUG_OBJ_LEVEL = $(firstword $(word 2,$(subst :, ,$(1))) 1)
  214. DEBUG_OBJ_BASE = $(word 1,$(subst :, ,$(1))).dbg$(call DEBUG_OBJ_LEVEL,$(1))
  215. DEBUG_OBJ = $(BIN)/$(call DEBUG_OBJ_BASE,$(1)).o
  216. DEBUG_ORIG_OBJ = $(BIN)/$(word 1,$(subst :, ,$(1))).o
  217. DEBUG_OBJS = $(foreach D,$(DEBUG_LIST),$(call DEBUG_OBJ,$(D)))
  218. DEBUG_ORIG_OBJS = $(foreach D,$(DEBUG_LIST),$(call DEBUG_ORIG_OBJ,$(D)))
  219. BLIB_OBJS = $(DEBUG_OBJS) $(filter-out $(DEBUG_ORIG_OBJS),$(BOBJS))
  220. # Print out all derived information for a given target.
  221. #
  222. $(BIN)/%.info :
  223. @echo 'Elements : $(TGT_ELEMENTS)'
  224. @echo 'Prefix : $(TGT_PREFIX)'
  225. @echo 'Drivers : $(TGT_DRIVERS)'
  226. @echo 'ROM name : $(TGT_ROM_NAME)'
  227. @echo 'Media : $(TGT_MEDIA)'
  228. @echo
  229. @echo 'PCI vendor : $(TGT_PCI_VENDOR)'
  230. @echo 'PCI device : $(TGT_PCI_DEVICE)'
  231. @echo
  232. @echo 'LD driver symbols : $(TGT_LD_DRIVERS)'
  233. @echo 'LD prefix symbols : $(TGT_LD_PREFIX)'
  234. @echo 'LD ID symbols : $(TGT_LD_IDS)'
  235. @echo
  236. @echo 'LD target flags : $(TGT_LD_FLAGS)'
  237. @echo
  238. @echo 'makerom target flags : $(TGT_MAKEROM_FLAGS)'
  239. @echo
  240. @echo 'Debugging objects : $(DEBUG_OBJS)'
  241. @echo 'Replaced objects : $(DEBUG_ORIG_OBJS)'
  242. # List of objects included in the last build of blib. This is needed
  243. # in order to correctly rebuild blib whenever the list of objects
  244. # changes.
  245. #
  246. BLIB_LIST = $(BIN)/.blib.list
  247. ifneq ($(shell cat $(BLIB_LIST)),$(BLIB_OBJS))
  248. $(shell echo "$(BLIB_OBJS)" > $(BLIB_LIST))
  249. endif
  250. $(BLIB_LIST) :
  251. VERYCLEANUP += $(BLIB_LIST)
  252. # Library of all objects
  253. #
  254. BLIB = $(BIN)/blib.a
  255. $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
  256. $(Q)$(RM) $(BLIB)
  257. $(QM)echo " [AR] $@"
  258. $(Q)$(AR) r $@ $(BLIB_OBJS)
  259. $(Q)$(RANLIB) $@
  260. blib : $(BLIB)
  261. # Build an intermediate object file from the objects required for the
  262. # specified target.
  263. #
  264. $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
  265. $(QM)echo " [LD] $@"
  266. $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
  267. -Map $(BIN)/$*.tmp.map
  268. $(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
  269. # Show a linker map for the specified target
  270. #
  271. $(BIN)/%.map : $(BIN)/%.tmp
  272. @less $(BIN)/$*.tmp.map
  273. # Build bochs symbol table
  274. $(BIN)/%.bxs : $(BIN)/%.tmp
  275. $(NM) $< | cut -d" " -f1,3 > $@
  276. # Rules for each media format. These are generated and placed in an
  277. # external Makefile fragment. We could do this via $(eval ...), but
  278. # that would require make >= 3.80.
  279. #
  280. # Note that there's an alternative way to generate most .rom images:
  281. # they can be copied from their 'master' ROM image using cp and
  282. # reprocessed with makerom to add the PCI IDs and ident string. The
  283. # relevant rule would look something like:
  284. #
  285. # $(BIN)/dfe538%rom : $(BIN)/rtl8139%rom
  286. # cat $< $@
  287. # $(FINALISE_rom)
  288. #
  289. # You can derive the ROM/driver relationships using the variables
  290. # DRIVER_<rom> and/or ROMS_<driver>.
  291. #
  292. # We don't currently do this, because (a) it would require generating
  293. # yet more Makefile fragments (since you need a rule for each ROM in
  294. # ROMS), and (b) the linker is so fast that it probably wouldn't make
  295. # much difference to the overall build time.
  296. media :
  297. @echo $(MEDIA)
  298. AUTO_MEDIA = $(filter-out $(NON_AUTO_MEDIA),$(MEDIA))
  299. automedia :
  300. @echo $(AUTO_MEDIA)
  301. # media_template : create Makefile rules for specified media
  302. #
  303. # $(1) is the media name (e.g. "rom")
  304. # $(2) is the full path to the .d file (e.g. "bin/deps/rom.media.d")
  305. #
  306. define media_template
  307. @echo "Generating Makefile rules for $(1) media"
  308. @$(MKDIR) -p $(dir $(2))
  309. @$(RM) $(2)
  310. @$(TOUCH) $(2)
  311. @echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).tmp' \
  312. '\n\t$$(OBJCOPY) -O binary $$< $$@' \
  313. '\n\t$$(FINALISE_$(1))' \
  314. > $(2)
  315. endef
  316. # Rule to generate the Makefile rules to be included
  317. #
  318. $(BIN)/deps/%.media.d : $(MAKEDEPS)
  319. $(if $(filter $(AUTO_MEDIA),$*), \
  320. $(call media_template,$*,$@), \
  321. @echo 'ERROR: $* is not an AUTO_MEDIA' ; exit 1)
  322. # Calculate and include the list of Makefile rules files
  323. #
  324. MEDIA_DEPS = $(patsubst %,$(BIN)/deps/%.media.d,$(AUTO_MEDIA))
  325. mediadeps :
  326. @echo $(MEDIA_DEPS)
  327. include $(MEDIA_DEPS)
  328. # The "allXXXs" targets for each suffix
  329. #
  330. allroms allzroms : all%s : $(foreach ROM,$(ROMS),$(BIN)/$(ROM).%)
  331. all%s : $(foreach DRIVER,$(DRIVERS),$(BIN)/$(DRIVER).%)
  332. # The compressor utility
  333. #
  334. $(NRV2B) : util/nrv2b.c $(MAKEDEPS)
  335. $(HOST_CC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG \
  336. -DBITSIZE=32 -DENDIAN=0 -o $@ $<
  337. CLEANUP += $(NRV2B)
  338. # Auto-incrementing build serial number. Append "bs" to your list of
  339. # build targets to get a serial number printed at the end of the
  340. # build. Enable -DBUILD_SERIAL in order to see it when the code runs.
  341. #
  342. BUILDSERIAL_H = config/.buildserial.h
  343. BUILDSERIAL_NOW = config/.buildserial.now
  344. BUILDSERIAL_NEXT = config/.buildserial.next
  345. $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) :
  346. echo 1 > $@
  347. $(BUILDSERIAL_H) : $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT)
  348. echo '#define BUILD_SERIAL_NUM $(shell cat $<)' > $@
  349. ifeq ($(filter bs,$(MAKECMDGOALS)),bs)
  350. $(shell diff -q $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) > /dev/null || \
  351. cp -f $(BUILDSERIAL_NEXT) $(BUILDSERIAL_NOW))
  352. endif
  353. bs : $(BUILDSERIAL_NOW)
  354. @echo $$(( $(shell cat $<) + 1 )) > $(BUILDSERIAL_NEXT)
  355. @echo "Build serial number is $(shell cat $<)"
  356. # List of available architectures
  357. #
  358. ARCHS = $(filter-out CVS,$(patsubst arch/%,%,$(wildcard arch/*)))
  359. archs :
  360. @echo $(ARCHS)
  361. OTHER_ARCHS = $(filter-out $(ARCH),$(ARCHS))
  362. otherarchs :
  363. @echo $(OTHER_ARCHS)
  364. # Build the TAGS file for emacs
  365. #
  366. TAGS : TAGS.$(ARCH)
  367. TAGS.$(ARCH) :
  368. ctags -e -R -f $@ --exclude=bin \
  369. $(foreach ARCH,$(OTHER_ARCHS),--exclude=arch/$(ARCH))
  370. CLEANUP += TAGS*
  371. # Symbol table checks
  372. #
  373. SYMTAB = $(BIN)/symtab
  374. $(SYMTAB) : $(BLIB)
  375. $(NM) -o -S $< > $@
  376. symcheck : $(SYMTAB)
  377. $(SYMCHECK) $<
  378. # Force rebuild for any given target
  379. #
  380. $(BIN)/%.rebuild :
  381. rm -f $(BIN)/$*
  382. $(MAKE) $(MAKEFLAGS) $(BIN)/$*
  383. # Documentation
  384. #
  385. $(BIN)/doxygen.cfg : doxygen.cfg $(MAKEDEPS)
  386. $(PERL) -pe 's{\@SRCDIRS\@}{$(SRCDIRS)}; ' \
  387. -e 's{\@BIN\@}{$(BIN)}; ' \
  388. -e 's{\@ARCH\@}{$(ARCH)}; ' \
  389. $< > $@
  390. $(BIN)/doc : $(BIN)/doxygen.cfg
  391. $(DOXYGEN) $<
  392. .PHONY : $(BIN)/doc
  393. VERYCLEANUP += $(BIN)/doc
  394. doc : $(BIN)/doc
  395. docview :
  396. @[ -f $(BIN)/doc/html/index.html ] || $(MAKE) $(BIN)/doc
  397. @if [ -n "$$BROWSER" ] ; then \
  398. ( $$BROWSER $(BIN)/doc/html/index.html & ) ; \
  399. else \
  400. echo "Documentation index in $(BIN)/doc/html/index.html" ; \
  401. fi
  402. # Clean-up
  403. #
  404. clean :
  405. $(RM) $(CLEANUP)
  406. veryclean : clean
  407. $(RM) -r $(VERYCLEANUP)
  408. # Make clean tarballs for release
  409. gpxe-tarball : ../VERSION
  410. (echo -n $(VERSION) ''; date -u +'%Y-%m-%d') > ../VERSION
  411. $(RM) -r /tmp/gpxe/gpxe-$(VERSION)
  412. mkdir -p /tmp/gpxe/gpxe-$(VERSION)
  413. cp -rP .. /tmp/gpxe/gpxe-$(VERSION)
  414. $(RM) -r /tmp/gpxe/CVS
  415. ( cd /tmp/gpxe/gpxe-$(VERSION)/src ; $(RM) -r bin/deps ; $(MAKE) clean ; $(MAKE) veryclean )
  416. ( cd /tmp/gpxe; tar cf /tmp/gpxe/gpxe-$(VERSION).tar --exclude CVS --exclude "#*" \
  417. --exclude "*~" gpxe-$(VERSION) )
  418. bzip2 -9 < /tmp/gpxe/gpxe-$(VERSION).tar > /tmp/gpxe/gpxe-$(VERSION).tar.bz2
  419. gzip -9 < /tmp/gpxe/gpxe-$(VERSION).tar > /tmp/gpxe/gpxe-$(VERSION).tar.gz
  420. $(RM) -r /tmp/gpxe/gpxe-$(VERSION)
  421. $(RM) /tmp/gpxe/gpxe-$(VERSION).tar
  422. ( cd /tmp/gpxe ; tar -zxf /tmp/gpxe/gpxe-$(VERSION).tar.gz )