2
0

rules.mk 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. #
  2. # Copyright (C) 2006-2010 OpenWrt.org
  3. # Copyright (C) 2016 LEDE Project
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. ifneq ($(__rules_inc),1)
  9. __rules_inc=1
  10. ifeq ($(DUMP),)
  11. -include $(TOPDIR)/.config
  12. endif
  13. include $(TOPDIR)/include/debug.mk
  14. include $(TOPDIR)/include/verbose.mk
  15. ifneq ($(filter check,$(MAKECMDGOALS)),)
  16. CHECK:=1
  17. DUMP:=1
  18. endif
  19. export TMP_DIR:=$(TOPDIR)/tmp
  20. qstrip=$(strip $(subst ",,$(1)))
  21. #"))
  22. empty:=
  23. space:= $(empty) $(empty)
  24. comma:=,
  25. merge=$(subst $(space),,$(1))
  26. confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
  27. strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
  28. paren_left = (
  29. paren_right = )
  30. chars_lower = a b c d e f g h i j k l m n o p q r s t u v w x y z
  31. chars_upper = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  32. define sep
  33. endef
  34. define newline
  35. endef
  36. __tr_list = $(join $(join $(1),$(foreach char,$(1),$(comma))),$(2))
  37. __tr_head_stripped = $(subst $(space),,$(foreach cv,$(call __tr_list,$(1),$(2)),$$$(paren_left)subst$(cv)$(comma)))
  38. __tr_head = $(subst $(paren_left)subst,$(paren_left)subst$(space),$(__tr_head_stripped))
  39. __tr_tail = $(subst $(space),,$(foreach cv,$(1),$(paren_right)))
  40. __tr_template = $(__tr_head)$$(1)$(__tr_tail)
  41. $(eval toupper = $(call __tr_template,$(chars_lower),$(chars_upper)))
  42. $(eval tolower = $(call __tr_template,$(chars_upper),$(chars_lower)))
  43. version_abbrev = $(if $(if $(CHECK),,$(DUMP)),$(1),$(shell printf '%.8s' $(1)))
  44. _SINGLE=export MAKEFLAGS=$(space);
  45. CFLAGS:=
  46. ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))
  47. ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
  48. BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
  49. SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
  50. TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
  51. export EXTRA_OPTIMIZATION:=$(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))
  52. TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
  53. BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
  54. SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
  55. BUILD_SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
  56. export SHELL:=/usr/bin/env bash
  57. IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1)
  58. OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
  59. ifeq ($(ARCH),powerpc)
  60. FPIC:=-fPIC
  61. else
  62. FPIC:=-fpic
  63. endif
  64. HOST_FPIC:=-fPIC
  65. ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE))
  66. GCC_ARCH:=
  67. ifneq ($(ARCH_SUFFIX),)
  68. ARCH_SUFFIX:=_$(ARCH_SUFFIX)
  69. endif
  70. ifneq ($(filter -march=armv%,$(TARGET_OPTIMIZATION)),)
  71. GCC_ARCH:=$(patsubst -march=%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
  72. endif
  73. ifdef CONFIG_HAS_SPE_FPU
  74. TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
  75. endif
  76. ifdef CONFIG_MIPS64_ABI
  77. ifneq ($(CONFIG_MIPS64_ABI_O32),y)
  78. ARCH_SUFFIX:=$(ARCH_SUFFIX)_$(call qstrip,$(CONFIG_MIPS64_ABI))
  79. endif
  80. endif
  81. DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
  82. OUTPUT_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin)
  83. BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET)
  84. INCLUDE_DIR:=$(TOPDIR)/include
  85. SCRIPT_DIR:=$(TOPDIR)/scripts
  86. BUILD_DIR_BASE:=$(TOPDIR)/build_dir
  87. ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
  88. GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
  89. LIBC:=$(call qstrip,$(CONFIG_LIBC))
  90. LIBCV:=$(call qstrip,$(CONFIG_LIBC_VERSION))
  91. REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))
  92. GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux
  93. DIR_SUFFIX:=_$(LIBC)-$(LIBCV)$(if $(CONFIG_arm),_eabi)
  94. BIN_DIR:=$(BIN_DIR)$(if $(CONFIG_USE_MUSL),,-$(LIBC))
  95. TARGET_DIR_NAME = target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
  96. TOOLCHAIN_DIR_NAME = toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
  97. else
  98. ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
  99. GNU_TARGET_NAME=$(call qstrip,$(CONFIG_TARGET_NAME))
  100. else
  101. GNU_TARGET_NAME=$(shell gcc -dumpmachine)
  102. endif
  103. REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME)
  104. TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
  105. TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
  106. endif
  107. ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
  108. iremap = -iremap $(1):$(2)
  109. endif
  110. PACKAGE_DIR:=$(BIN_DIR)/packages
  111. BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
  112. STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
  113. BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
  114. TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/$(TOOLCHAIN_DIR_NAME)
  115. STAMP_DIR:=$(BUILD_DIR)/stamp
  116. STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp
  117. TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR))
  118. TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD)
  119. STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
  120. BUILD_LOG_DIR:=$(TOPDIR)/logs
  121. PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
  122. BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR)/host,$(BUILD_DIR_BASE)/host)
  123. STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
  124. STAGING_DIR_HOSTPKG:=$(STAGING_DIR)/host
  125. TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
  126. TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH))
  127. TARGET_INIT_PATH:=$(if $(TARGET_INIT_PATH),$(TARGET_INIT_PATH),/usr/sbin:/sbin:/usr/bin:/bin)
  128. TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))
  129. TARGET_CXXFLAGS = $(TARGET_CFLAGS)
  130. TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS)
  131. TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT)
  132. TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
  133. TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
  134. ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
  135. LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC))))
  136. LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s)
  137. LIBGCC_A=$(realpath $(lastword $(wildcard $(dir $(LIBGCC_S_PATH))/gcc/*/*/libgcc.a)))
  138. else
  139. LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a))
  140. LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A))
  141. endif
  142. LIBRPC=-lrpc
  143. LIBRPC_DEPENDS=+librpc
  144. ifeq ($(CONFIG_ARCH_64BIT),y)
  145. LIB_SUFFIX:=64
  146. endif
  147. ifndef DUMP
  148. ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
  149. -include $(TOOLCHAIN_DIR)/info.mk
  150. export GCC_HONOUR_COPTS:=0
  151. TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
  152. TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
  153. TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
  154. ifeq ($(CONFIG_USE_MUSL),y)
  155. TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify
  156. endif
  157. TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include
  158. TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
  159. TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
  160. else
  161. ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
  162. TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
  163. TOOLCHAIN_ROOT_DIR:=$(call qstrip,$(CONFIG_TOOLCHAIN_ROOT))
  164. TOOLCHAIN_BIN_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_BIN_PATH)))
  165. TOOLCHAIN_INC_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))
  166. TOOLCHAIN_LIB_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))
  167. ifneq ($(TOOLCHAIN_BIN_DIRS),)
  168. TARGET_PATH:=$(subst $(space),:,$(TOOLCHAIN_BIN_DIRS)):$(TARGET_PATH)
  169. endif
  170. ifneq ($(TOOLCHAIN_INC_DIRS),)
  171. TARGET_CPPFLAGS+= $(patsubst %,-I%,$(TOOLCHAIN_INC_DIRS))
  172. endif
  173. ifneq ($(TOOLCHAIN_LIB_DIRS),)
  174. TARGET_LDFLAGS+= $(patsubst %,-L%,$(TOOLCHAIN_LIB_DIRS))
  175. endif
  176. TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
  177. endif
  178. endif
  179. endif
  180. TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(TARGET_PATH)
  181. ifeq ($(CONFIG_SOFT_FLOAT),y)
  182. SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
  183. ifeq ($(CONFIG_arm),y)
  184. TARGET_CFLAGS+= -mfloat-abi=soft
  185. else
  186. TARGET_CFLAGS+= -msoft-float
  187. endif
  188. else
  189. SOFT_FLOAT_CONFIG_OPTION:=
  190. ifeq ($(CONFIG_arm),y)
  191. TARGET_CFLAGS+= -mfloat-abi=hard
  192. endif
  193. endif
  194. export PATH:=$(TARGET_PATH)
  195. export STAGING_DIR STAGING_DIR_HOST
  196. export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
  197. PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
  198. export PKG_CONFIG
  199. HOSTCC:=gcc
  200. HOSTCXX:=g++
  201. HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR)/host/include)
  202. HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
  203. HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR)/host/lib)
  204. ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
  205. TARGET_AR:=$(TARGET_CROSS)gcc-ar
  206. TARGET_RANLIB:=$(TARGET_CROSS)gcc-ranlib
  207. TARGET_NM:=$(TARGET_CROSS)gcc-nm
  208. else
  209. TARGET_AR:=$(TARGET_CROSS)ar
  210. TARGET_RANLIB:=$(TARGET_CROSS)ranlib
  211. TARGET_NM:=$(TARGET_CROSS)nm
  212. endif
  213. BUILD_KEY=$(TOPDIR)/key-build
  214. TARGET_CC:=$(TARGET_CROSS)gcc
  215. TARGET_CXX:=$(TARGET_CROSS)g++
  216. KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
  217. SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
  218. CP:=cp -fpR
  219. LN:=ln -sf
  220. XARGS:=xargs -r
  221. BASH:=bash
  222. TAR:=tar
  223. FIND:=find
  224. PATCH:=patch
  225. PYTHON:=python
  226. INSTALL_BIN:=install -m0755
  227. INSTALL_DIR:=install -d -m0755
  228. INSTALL_DATA:=install -m0644
  229. INSTALL_CONF:=install -m0600
  230. TARGET_CC_NOCACHE:=$(TARGET_CC)
  231. TARGET_CXX_NOCACHE:=$(TARGET_CXX)
  232. HOSTCC_NOCACHE:=$(HOSTCC)
  233. HOSTCXX_NOCACHE:=$(HOSTCXX)
  234. export TARGET_CC_NOCACHE
  235. export TARGET_CXX_NOCACHE
  236. export HOSTCC_NOCACHE
  237. ifneq ($(CONFIG_CCACHE),)
  238. TARGET_CC:= ccache_cc
  239. TARGET_CXX:= ccache_cxx
  240. HOSTCC:= ccache $(HOSTCC)
  241. HOSTCXX:= ccache $(HOSTCXX)
  242. endif
  243. TARGET_CONFIGURE_OPTS = \
  244. AR="$(TARGET_AR)" \
  245. AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
  246. LD=$(TARGET_CROSS)ld \
  247. NM="$(TARGET_NM)" \
  248. CC="$(TARGET_CC)" \
  249. GCC="$(TARGET_CC)" \
  250. CXX="$(TARGET_CXX)" \
  251. RANLIB="$(TARGET_RANLIB)" \
  252. STRIP=$(TARGET_CROSS)strip \
  253. OBJCOPY=$(TARGET_CROSS)objcopy \
  254. OBJDUMP=$(TARGET_CROSS)objdump \
  255. SIZE=$(TARGET_CROSS)size
  256. # strip an entire directory
  257. ifneq ($(CONFIG_NO_STRIP),)
  258. RSTRIP:=:
  259. STRIP:=:
  260. else
  261. ifneq ($(CONFIG_USE_STRIP),)
  262. STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
  263. else
  264. ifneq ($(CONFIG_USE_SSTRIP),)
  265. STRIP:=$(STAGING_DIR_HOST)/bin/sstrip
  266. endif
  267. endif
  268. RSTRIP= \
  269. export CROSS="$(TARGET_CROSS)" \
  270. $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \
  271. $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
  272. $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
  273. NM="$(TARGET_CROSS)nm" \
  274. STRIP="$(STRIP)" \
  275. STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
  276. PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \
  277. $(SCRIPT_DIR)/rstrip.sh
  278. endif
  279. ifeq ($(CONFIG_IPV6),y)
  280. DISABLE_IPV6:=
  281. else
  282. DISABLE_IPV6:=--disable-ipv6
  283. endif
  284. TAR_OPTIONS:=-xf -
  285. ifeq ($(CONFIG_BUILD_LOG),y)
  286. BUILD_LOG:=1
  287. endif
  288. export BISON_PKGDATADIR:=$(STAGING_DIR_HOST)/share/bison
  289. export M4:=$(STAGING_DIR_HOST)/bin/m4
  290. define shvar
  291. V_$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
  292. endef
  293. define shexport
  294. export $(call shvar,$(1))=$$(call $(1))
  295. endef
  296. define include_mk
  297. $(eval -include $(if $(DUMP),,$(STAGING_DIR)/mk/$(strip $(1))))
  298. endef
  299. # Execute commands under flock
  300. # $(1) => The shell expression.
  301. # $(2) => The lock name. If not given, the global lock will be used.
  302. ifneq ($(wildcard $(STAGING_DIR_HOST)/bin/flock),)
  303. define locked
  304. SHELL= \
  305. flock \
  306. $(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
  307. -c '$(subst ','\'',$(1))'
  308. endef
  309. else
  310. locked=$(1)
  311. endif
  312. # Recursively copy paths into another directory, purge dangling
  313. # symlinks before.
  314. # $(1) => File glob expression
  315. # $(2) => Destination directory
  316. define file_copy
  317. for src_dir in $(sort $(foreach d,$(wildcard $(1)),$(dir $(d)))); do \
  318. ( cd $$src_dir; find -type f -or -type d ) | \
  319. ( cd $(2); while :; do \
  320. read FILE; \
  321. [ -z "$$FILE" ] && break; \
  322. [ -L "$$FILE" ] || continue; \
  323. echo "Removing symlink $(2)/$$FILE"; \
  324. rm -f "$$FILE"; \
  325. done; ); \
  326. done; \
  327. $(CP) $(1) $(2)
  328. endef
  329. # Calculate sha256sum of any plain file within a given directory
  330. # $(1) => Input directory
  331. define sha256sums
  332. (cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
  333. xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
  334. endef
  335. # file extension
  336. ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
  337. all:
  338. FORCE: ;
  339. .PHONY: FORCE
  340. check: FORCE
  341. @true
  342. val.%:
  343. @$(if $(filter undefined,$(origin $*)),\
  344. echo "$* undefined" >&2, \
  345. echo '$(subst ','"'"',$($*))' \
  346. )
  347. var.%:
  348. @$(if $(filter undefined,$(origin $*)),\
  349. echo "$* undefined" >&2, \
  350. echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
  351. )
  352. endif #__rules_inc