build.mk 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. TOPDIR=$(shell pwd)
  4. export TOPDIR
  5. ifneq ($(shell umask 2>/dev/null | sed 's/0*022/OK/'),OK)
  6. $(error your umask is not 022)
  7. endif
  8. CONFIG_CONFIG_IN = Config.in
  9. CONFIG = config
  10. DEFCONFIG= ADK_DEVELSYSTEM=n \
  11. ADK_DEBUG=n \
  12. ADK_STATIC=n \
  13. ADK_MAKE_PARALLEL=n \
  14. ADK_FORCE_PARALLEL=n \
  15. ADK_PACKAGE_GRUB=n \
  16. ADK_PACKAGE_AUFS2_UTIL=n \
  17. ADK_PACKAGE_BASE_FILES=y \
  18. ADK_PACKAGE_GCC=n \
  19. ADK_PACKAGE_MGETTY=n \
  20. ADK_COMPILE_HEIMDAL=n \
  21. ADK_PACKAGE_HEIMDAL_PKINIT=n \
  22. ADK_PACKAGE_HEIMDAL_SERVER=n \
  23. ADK_PACKAGE_LIBHEIMDAL=n \
  24. ADK_PACKAGE_LIBHEIMDAL_CLIENT=n \
  25. BUSYBOX_BBCONFIG=n \
  26. BUSYBOX_SELINUX=n \
  27. BUSYBOX_MODPROBE_SMALL=n \
  28. BUSYBOX_EJECT=n \
  29. BUSYBOX_BUILD_LIBBUSYBOX=n \
  30. BUSYBOX_FEATURE_2_4_MODULES=n \
  31. BUSYBOX_LOCALE_SUPPORT=n \
  32. BUSYBOX_FEATURE_PREFER_APPLETS=n \
  33. BUSYBOX_FEATURE_SUID=n \
  34. BUSYBOX_SELINUXENABLED=n \
  35. BUSYBOX_FEATURE_INSTALLER=n \
  36. BUSYBOX_PAM=n \
  37. BUSYBOX_FLASH_LOCK=n \
  38. BUSYBOX_FLASH_UNLOCK=n \
  39. BUSYBOX_FLASH_ERASEALL=n \
  40. BUSYBOX_PIE=n \
  41. BUSYBOX_TASKSET=n \
  42. BUSYBOX_DEBUG=n \
  43. BUSYBOX_NOMMU=n \
  44. BUSYBOX_WERROR=n \
  45. BUSYBOX_STATIC=n \
  46. BUSYBOX_FEATURE_AIX_LABEL=n \
  47. BUSYBOX_FEATURE_SUN_LABEL=n \
  48. BUSYBOX_FEATURE_OSF_LABEL=n \
  49. BUSYBOX_FEATURE_SGI_LABEL=n \
  50. ADK_KERNEL_RT2X00_DEBUG=n \
  51. ADK_KERNEL_ATH5K_DEBUG=n \
  52. ADK_KERNEL_DEBUG_WITH_KGDB=n
  53. noconfig_targets:= menuconfig \
  54. _config \
  55. _mconfig \
  56. distclean \
  57. defconfig \
  58. tags
  59. POSTCONFIG= -@ \
  60. if [ -f .config.old ];then \
  61. if [ -f .busyboxcfg ];then \
  62. rm .busyboxcfg; \
  63. fi; \
  64. fi
  65. # Pull in the user's configuration file
  66. ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
  67. -include $(TOPDIR)/.config
  68. endif
  69. ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  70. include $(TOPDIR)/rules.mk
  71. include ${TOPDIR}/mk/split-cfg.mk
  72. all: world
  73. ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile)
  74. mksh ${TOPDIR}/package/depmaker
  75. .NOTPARALLEL:
  76. .PHONY: all world clean cleantarget cleandir distclean image_clean
  77. world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.ADK_HAVE_DOT_CONFIG
  78. ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
  79. ifeq ($(ADK_NATIVE),y)
  80. $(MAKE) -f mk/build.mk toolchain/kernel-headers-prepare target/config-prepare target/compile package/compile root_clean package/install package_index target/install
  81. else
  82. ifeq ($(ADK_TOOLCHAIN_ONLY),y)
  83. $(MAKE) -f mk/build.mk toolchain/install package/compile
  84. else
  85. $(MAKE) -f mk/build.mk toolchain/install target/config-prepare target/compile package/compile root_clean package/install package_index target/install
  86. endif
  87. endif
  88. package_index:
  89. ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
  90. -cd ${PACKAGE_DIR} && \
  91. ${BASH} ${TOPDIR}/scripts/ipkg-make-index.sh . >Packages
  92. endif
  93. $(DISTDIR):
  94. mkdir -p $(DISTDIR)
  95. $(BUILD_DIR):
  96. mkdir -p $(BUILD_DIR)
  97. $(TARGET_DIR):
  98. mkdir -p $(TARGET_DIR)
  99. $(PACKAGE_DIR):
  100. mkdir -p ${PACKAGE_DIR}/.stamps
  101. ${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_TOOLS}:
  102. mkdir -p ${STAGING_DIR}/{bin,etc,lib,usr/include} \
  103. ${STAGING_TOOLS}/{bin,lib}
  104. ${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc
  105. ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
  106. echo "dest root /" >${STAGING_DIR}/etc/ipkg.conf
  107. echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf
  108. endif
  109. package/%: ${TOPDIR}/.ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk
  110. $(MAKE) -C package $(patsubst package/%,%,$@)
  111. target/%: ${TOPDIR}/.ADK_HAVE_DOT_CONFIG
  112. $(MAKE) -C target $(patsubst target/%,%,$@)
  113. toolchain/%: ${STAGING_DIR}
  114. $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
  115. image:
  116. $(MAKE) -C target image
  117. switch:
  118. echo "Saving configuration for target: ${ADK_TARGET}"
  119. cp -p .config .config.${ADK_TARGET}
  120. if [ -f .config.old ];then cp -p .config.old .config.old.${ADK_TARGET};fi
  121. if [ -f .config.split ];then cp -p .config.split .config.split.${ADK_TARGET};fi
  122. if [ -f .config.${TARGET} ];then cp -p .config.${TARGET} .config; \
  123. cp -p .config.old.${TARGET} .config.old; \
  124. cp -p .config.split.${TARGET} .config.split; \
  125. echo "Setting configuration to target: ${TARGET}"; \
  126. else echo "No old target config found";mv .config .config.bak; make TARGET=${TARGET};fi
  127. kernelconfig:
  128. cp $(TOPDIR)/target/$(ADK_TARGET)/kernel.config $(BUILD_DIR)/linux/.config
  129. $(MAKE) -C $(BUILD_DIR)/linux/ ARCH=$(ARCH) menuconfig
  130. cp $(BUILD_DIR)/linux/.config $(TOPDIR)/target/$(ADK_TARGET)/kernel.config
  131. # create a new package from package/.template
  132. newpackage:
  133. @echo "Creating new package $(PKG)"
  134. $(CP) $(TOPDIR)/package/.template $(TOPDIR)/package/$(PKG)
  135. pkg=$$(echo $(PKG)|tr '[:lower:]-' '[:upper:]_'); \
  136. $(SED) "s#@UPKG@#$$pkg#" $(TOPDIR)/package/$(PKG)/Makefile
  137. $(SED) 's#@PKG@#$(PKG)#' $(TOPDIR)/package/$(PKG)/Makefile
  138. $(SED) 's#@VER@#$(VER)#' $(TOPDIR)/package/$(PKG)/Makefile
  139. @echo "Edit package/$(PKG)/Makefile to complete"
  140. @echo "Do not forget to add package to package/Config.in"
  141. #############################################################
  142. #
  143. # Cleanup and misc junk
  144. #
  145. #############################################################
  146. root_clean:
  147. @$(TRACE) root_clean
  148. rm -rf $(TARGET_DIR)
  149. mkdir -p $(TARGET_DIR)
  150. # Do a per-package clean here, too. This way stale headers and
  151. # libraries from cross_*/target/ get wiped away, which keeps
  152. # future package build's configure scripts from returning false
  153. # dependencies information.
  154. clean:
  155. @$(TRACE) clean
  156. $(MAKE) -C $(CONFIG) clean
  157. for d in ${STAGING_PARENT}; do \
  158. for f in $$(ls $$d/pkg/[a-z]* 2>/dev/null); do \
  159. while read file ; do \
  160. rm $$d/target/$$file 2>/dev/null; \
  161. done < $$f ; \
  162. rm $$f ; \
  163. done \
  164. done
  165. rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
  166. ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC} \
  167. ${TOPDIR}/package/pkglist.d
  168. rm -f ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk
  169. cleankernel:
  170. @$(TRACE) cleankernel
  171. rm -rf $(TOOLCHAIN_BUILD_DIR)/w-linux* $(BUILD_DIR)/linux
  172. cleandir:
  173. @$(TRACE) cleandir
  174. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  175. rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) \
  176. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  177. rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) \
  178. $(TOOLS_BUILD_DIR)
  179. rm -f .menu .tmpconfig.h ${TOPDIR}/package/*/info.mk \
  180. ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk \
  181. .busyboxcfg
  182. cleantarget:
  183. @$(TRACE) cleantarget
  184. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  185. rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
  186. ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}
  187. rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT)
  188. rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk \
  189. .busyboxcfg all.config .defconfig
  190. distclean:
  191. @$(TRACE) distclean
  192. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  193. @rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
  194. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  195. @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) \
  196. $(TOOLS_BUILD_DIR)
  197. @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
  198. .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk \
  199. .busyboxcfg .ADK_HAVE_DOT_CONFIG
  200. else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  201. ifeq ($(filter-out distclean,${MAKECMDGOALS}),)
  202. include ${TOPDIR}/mk/vars.mk
  203. else
  204. include $(TOPDIR)/prereq.mk
  205. export BASH HOSTCC HOSTCFLAGS HOSTCXX HOSTCXXFLAGS MAKE LANGUAGE LC_ALL OStype PATH
  206. endif
  207. all: menuconfig
  208. @echo "Start the build with \"make\" or with \"make v\" to be verbose"
  209. # configuration
  210. # ---------------------------------------------------------------------------
  211. # force entering the subdir, as dependency checking is done there
  212. .PHONY: $(CONFIG)/conf $(CONFIG)/mconf
  213. $(CONFIG)/conf:
  214. @$(MAKE) -C $(CONFIG) conf
  215. $(CONFIG)/mconf:
  216. @$(MAKE) -C $(CONFIG)
  217. defconfig: .menu $(CONFIG)/conf
  218. ifeq (${OStype},Linux)
  219. @echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig
  220. endif
  221. ifeq (${OStype},FreeBSD)
  222. @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/.defconfig
  223. endif
  224. ifeq (${OStype},MirBSD)
  225. @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/.defconfig
  226. endif
  227. ifeq (${OStype},OpenBSD)
  228. @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/.defconfig
  229. endif
  230. ifeq (${OStype},NetBSD)
  231. @echo ADK_HOST_NETBSD=y > $(TOPDIR)/.defconfig
  232. endif
  233. ifeq (${OStype},Darwin)
  234. @echo ADK_HOST_DARWIN=y > $(TOPDIR)/.defconfig
  235. endif
  236. ifneq (,$(filter CYGWIN%,${OStype}))
  237. @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/.defconfig
  238. endif
  239. @if [ ! -z "$(TARGET)" ];then \
  240. grep "^config" target/Config.in \
  241. |grep -i "$(TARGET)"\$$ \
  242. |sed -e "s#^config \(.*\)#\1=y#" \
  243. >> $(TOPDIR)/.defconfig; \
  244. fi
  245. for symbol in ${DEFCONFIG}; do \
  246. echo $$symbol >> $(TOPDIR)/.defconfig; \
  247. done; \
  248. @if [ ! -z "$(FS)" ];then \
  249. grep "^config" target/Config.in \
  250. |grep -i "$(FS)" \
  251. |sed -e "s#^config \(.*\)#\1=y#" \
  252. >> $(TOPDIR)/.defconfig; \
  253. fi
  254. @if [ ! -z "$(PKG)" ];then \
  255. grep "^config" target/Config.in \
  256. |grep -i "$(PKG)" \
  257. |sed -e "s#^config \(.*\)#\1=y#" \
  258. >> $(TOPDIR)/.defconfig; \
  259. fi
  260. @if [ ! -z "$(LIBC)" ];then \
  261. grep "^config" target/Config.in \
  262. |grep -i "$(LIBC)" \
  263. |sed -e "s#^config \(.*\)#\1=y#" \
  264. >> $(TOPDIR)/.defconfig; \
  265. fi
  266. ifneq (,$(filter %_qemu,${TARGET}))
  267. @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/.defconfig
  268. endif
  269. ifneq (,$(filter %_toolchain,${TARGET}))
  270. @echo ADK_LINUX_TOOLCHAIN=y >> $(TOPDIR)/.defconfig
  271. endif
  272. ifneq (,$(filter rescue%,${TARGET}))
  273. @echo ADK_LINUX_RESCUE=y >> $(TOPDIR)/.defconfig
  274. endif
  275. ifneq (,$(filter rb%,${TARGET}))
  276. @echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/.defconfig
  277. endif
  278. ifneq (,$(filter alix%,${TARGET}))
  279. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
  280. endif
  281. ifneq (,$(filter wrap%,${TARGET}))
  282. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
  283. endif
  284. @if [ ! -z "$(TARGET)" ];then \
  285. $(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
  286. fi
  287. modconfig:
  288. ifeq (${OStype},Linux)
  289. @echo ADK_HOST_LINUX=y > $(TOPDIR)/all.config
  290. endif
  291. ifeq (${OStype},FreeBSD)
  292. @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/all.config
  293. endif
  294. ifeq (${OStype},MirBSD)
  295. @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/all.config
  296. endif
  297. ifeq (${OStype},OpenBSD)
  298. @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/all.config
  299. endif
  300. ifeq (${OStype},NetBSD)
  301. @echo ADK_HOST_NETBSD=y > $(TOPDIR)/all.config
  302. endif
  303. ifeq (${OStype},Darwin)
  304. @echo ADK_HOST_DARWIN=y > $(TOPDIR)/all.config
  305. endif
  306. ifneq (,$(filter CYGWIN%,${OStype}))
  307. @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/all.config
  308. endif
  309. @if [ ! -z "$(TARGET)" ];then \
  310. grep "^config" target/Config.in \
  311. |grep -i "$(TARGET)"\$$ \
  312. |sed -e "s#^config \(.*\)#\1=y#" \
  313. >> $(TOPDIR)/all.config; \
  314. fi
  315. for symbol in ${DEFCONFIG}; do \
  316. echo $$symbol >> $(TOPDIR)/all.config; \
  317. done; \
  318. @if [ ! -z "$(FS)" ];then \
  319. grep "^config" target/Config.in \
  320. |grep -i "$(FS)" \
  321. |sed -e "s#^config \(.*\)#\1=y#" \
  322. >> $(TOPDIR)/all.config; \
  323. fi
  324. @if [ ! -z "$(PKG)" ];then \
  325. grep "^config" target/Config.in \
  326. |grep -i "$(PKG)" \
  327. |sed -e "s#^config \(.*\)#\1=y#" \
  328. >> $(TOPDIR)/all.config; \
  329. fi
  330. @if [ ! -z "$(LIBC)" ];then \
  331. grep "^config" target/Config.in \
  332. |grep -i "$(LIBC)" \
  333. |sed -e "s#^config \(.*\)#\1=y#" \
  334. >> $(TOPDIR)/all.config; \
  335. fi
  336. ifneq (,$(filter %_qemu,${TARGET}))
  337. @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/all.config
  338. endif
  339. ifneq (,$(filter %_toolchain,${TARGET}))
  340. @echo ADK_LINUX_TOOLCHAIN=y >> $(TOPDIR)/all.config
  341. endif
  342. ifneq (,$(filter %_rescue,${TARGET}))
  343. @echo ADK_LINUX_RESCUE=y >> $(TOPDIR)/all.config
  344. endif
  345. ifneq (,$(filter rb%,${TARGET}))
  346. @echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/all.config
  347. endif
  348. ifneq (,$(filter alix%,${TARGET}))
  349. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
  350. endif
  351. ifneq (,$(filter wrap%,${TARGET}))
  352. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
  353. endif
  354. menuconfig: $(CONFIG)/mconf defconfig .menu
  355. @if [ ! -f .config ];then \
  356. $(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
  357. fi
  358. @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
  359. ${POSTCONFIG}
  360. _config: $(CONFIG)/conf .menu
  361. -@touch .config
  362. @$(CONFIG)/conf ${W} $(CONFIG_CONFIG_IN)
  363. ${POSTCONFIG}
  364. .NOTPARALLEL: _mconfig
  365. _mconfig: ${CONFIG}/conf _mconfig2 _config
  366. _mconfig2: ${CONFIG}/conf modconfig .menu
  367. @${CONFIG}/conf -m ${RCONFIG} >/dev/null
  368. distclean:
  369. @$(MAKE) -C $(CONFIG) clean
  370. @rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
  371. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  372. @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR)
  373. @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
  374. .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG
  375. endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  376. # build all targets and combinations
  377. bulk:
  378. @while read target libc fs; do \
  379. mkdir -p $(TOPDIR)/bin/$${target}_$$libc; \
  380. ( \
  381. echo === building $$target $$libc $$fs on $$(date); \
  382. $(GMAKE) prereq && \
  383. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs defconfig; \
  384. $(GMAKE) VERBOSE=1 all; \
  385. rm .config; \
  386. ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \
  387. done <${TOPDIR}/target/bulk.lst
  388. bulktoolchain:
  389. @while read target libc; do \
  390. mkdir -p $(TOPDIR)/bin/$${target}_$$libc; \
  391. ( \
  392. echo === building $$target $$libc on $$(date); \
  393. $(GMAKE) prereq && \
  394. $(GMAKE) TARGET=$$target LIBC=$$libc defconfig; \
  395. $(GMAKE) VERBOSE=1 all; \
  396. rm .config; \
  397. ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc.log; \
  398. done <${TOPDIR}/target/bulktool.lst
  399. bulkall:
  400. @while read target libc fs; do \
  401. mkdir -p $(TOPDIR)/bin/$${target}_$$libc; \
  402. ( \
  403. echo === building $$target $$libc $$fs on $$(date); \
  404. $(GMAKE) prereq && \
  405. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allconfig; \
  406. $(GMAKE) VERBOSE=1 all; \
  407. rm .config; \
  408. ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \
  409. done <${TOPDIR}/target/bulk.lst
  410. bulkallmod:
  411. @while read target libc fs; do \
  412. mkdir -p $(TOPDIR)/bin/$${target}_$$libc; \
  413. ( \
  414. echo === building $$target $$libc $$fs on $$(date); \
  415. $(GMAKE) prereq && \
  416. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allmodconfig; \
  417. $(GMAKE) VERBOSE=1 all; \
  418. rm .config; \
  419. ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \
  420. done <${TOPDIR}/target/bulk.lst
  421. menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile)
  422. mksh $(TOPDIR)/package/pkgmaker
  423. @:>.menu
  424. dep:
  425. mksh $(TOPDIR)/package/depmaker
  426. .PHONY: menu dep