mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
speed up the build system by including include/shell.sh on shell commands only where necessary
SVN-Revision: 22720
This commit is contained in:
parent
caf173f869
commit
a9136c0892
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check"
|
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check"
|
||||||
|
|
||||||
find_md5=find $(1) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | md5s
|
find_md5=$(SH_FUNC) find $(1) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | md5s
|
||||||
|
|
||||||
define rdep
|
define rdep
|
||||||
.PRECIOUS: $(2)
|
.PRECIOUS: $(2)
|
||||||
|
@ -64,6 +64,7 @@ define KernelPackage/Defaults
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define ModuleAutoLoad
|
define ModuleAutoLoad
|
||||||
|
$(SH_FUNC) \
|
||||||
export modules=; \
|
export modules=; \
|
||||||
add_module() { \
|
add_module() { \
|
||||||
mkdir -p $(2)/etc/modules.d; \
|
mkdir -p $(2)/etc/modules.d; \
|
||||||
|
@ -43,7 +43,7 @@ endef
|
|||||||
Build/Patch:=$(Build/Patch/Default)
|
Build/Patch:=$(Build/Patch/Default)
|
||||||
ifneq ($(strip $(PKG_UNPACK)),)
|
ifneq ($(strip $(PKG_UNPACK)),)
|
||||||
define Build/Prepare/Default
|
define Build/Prepare/Default
|
||||||
$(PKG_UNPACK)
|
$(SH_FUNC) $(PKG_UNPACK)
|
||||||
$(Build/Patch)
|
$(Build/Patch)
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
@ -21,7 +21,7 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
|||||||
|
|
||||||
define BuildIPKGVariable
|
define BuildIPKGVariable
|
||||||
$(call shexport,Package/$(1)/$(2))
|
$(call shexport,Package/$(1)/$(2))
|
||||||
$(1)_COMMANDS += var2file "$(call shvar,Package/$(1)/$(2))" $(2);
|
$(1)_COMMANDS += $(SH_FUNC) var2file "$(call shvar,Package/$(1)/$(2))" $(2);
|
||||||
endef
|
endef
|
||||||
|
|
||||||
PARENL :=(
|
PARENL :=(
|
||||||
@ -95,7 +95,7 @@ ifeq ($(DUMP),)
|
|||||||
echo "Maintainer: $(MAINTAINER)"; \
|
echo "Maintainer: $(MAINTAINER)"; \
|
||||||
echo "Architecture: $(PKGARCH)"; \
|
echo "Architecture: $(PKGARCH)"; \
|
||||||
echo "Installed-Size: 1"; \
|
echo "Installed-Size: 1"; \
|
||||||
echo -n "Description: "; getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
|
echo -n "Description: "; $(SH_FUNC) getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
|
||||||
) >> $$(IDIR_$(1))/CONTROL/control
|
) >> $$(IDIR_$(1))/CONTROL/control
|
||||||
chmod 644 $$(IDIR_$(1))/CONTROL/control
|
chmod 644 $$(IDIR_$(1))/CONTROL/control
|
||||||
(cd $$(IDIR_$(1))/CONTROL; \
|
(cd $$(IDIR_$(1))/CONTROL; \
|
||||||
|
@ -67,10 +67,10 @@ define Profile
|
|||||||
echo "Target-Profile-Kconfig: yes"; \
|
echo "Target-Profile-Kconfig: yes"; \
|
||||||
fi; \
|
fi; \
|
||||||
echo "Target-Profile-Config: "; \
|
echo "Target-Profile-Config: "; \
|
||||||
getvar "$(call shvar,Profile/$(1)/Config)"; \
|
$(SH_FUNC) getvar "$(call shvar,Profile/$(1)/Config)"; \
|
||||||
echo "@@"; \
|
echo "@@"; \
|
||||||
echo "Target-Profile-Description:"; \
|
echo "Target-Profile-Description:"; \
|
||||||
getvar "$(call shvar,Profile/$(1)/Description)"; \
|
$(SH_FUNC) getvar "$(call shvar,Profile/$(1)/Description)"; \
|
||||||
echo "@@"; \
|
echo "@@"; \
|
||||||
echo;
|
echo;
|
||||||
ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_)$(1))),y)
|
ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_)$(1))),y)
|
||||||
@ -185,7 +185,7 @@ define BuildTargets/DumpCurrent
|
|||||||
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
||||||
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
||||||
echo 'Target-Description:'; \
|
echo 'Target-Description:'; \
|
||||||
getvar $(call shvar,Target/Description); \
|
$(SH_FUNC) getvar $(call shvar,Target/Description); \
|
||||||
echo '@@'; \
|
echo '@@'; \
|
||||||
echo 'Default-Packages: $(DEFAULT_PACKAGES)'; \
|
echo 'Default-Packages: $(DEFAULT_PACKAGES)'; \
|
||||||
$(DUMPINFO)
|
$(DUMPINFO)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
RELEASE:=Kamikaze
|
RELEASE:=Kamikaze
|
||||||
SHELL:=/usr/bin/env bash
|
export SHELL:=/usr/bin/env bash
|
||||||
PREP_MK= OPENWRT_BUILD= QUIET=0
|
PREP_MK= OPENWRT_BUILD= QUIET=0
|
||||||
|
|
||||||
include $(TOPDIR)/include/verbose.mk
|
include $(TOPDIR)/include/verbose.mk
|
||||||
|
@ -71,10 +71,10 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef PKG_BUILD_DIR
|
ifdef PKG_BUILD_DIR
|
||||||
PKG_UNPACK ?= $(call UNPACK_CMD,$(PKG_BUILD_DIR)) $(call CRLF_CMD,$(PKG_BUILD_DIR))
|
PKG_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(PKG_BUILD_DIR)) $(call CRLF_CMD,$(PKG_BUILD_DIR))
|
||||||
endif
|
endif
|
||||||
ifdef HOST_BUILD_DIR
|
ifdef HOST_BUILD_DIR
|
||||||
HOST_UNPACK ?= $(call UNPACK_CMD,$(HOST_BUILD_DIR)) $(call CRLF_CMD,$(HOST_BUILD_DIR))
|
HOST_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(HOST_BUILD_DIR)) $(call CRLF_CMD,$(HOST_BUILD_DIR))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # PKG_SOURCE
|
endif # PKG_SOURCE
|
||||||
|
3
rules.mk
3
rules.mk
@ -16,8 +16,6 @@ include $(TOPDIR)/include/verbose.mk
|
|||||||
|
|
||||||
TMP_DIR:=$(TOPDIR)/tmp
|
TMP_DIR:=$(TOPDIR)/tmp
|
||||||
|
|
||||||
export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --
|
|
||||||
|
|
||||||
GREP_OPTIONS=
|
GREP_OPTIONS=
|
||||||
export GREP_OPTIONS
|
export GREP_OPTIONS
|
||||||
|
|
||||||
@ -148,6 +146,7 @@ endif
|
|||||||
export PATH:=$(TARGET_PATH)
|
export PATH:=$(TARGET_PATH)
|
||||||
export STAGING_DIR
|
export STAGING_DIR
|
||||||
export GCC_HONOUR_COPTS:=0
|
export GCC_HONOUR_COPTS:=0
|
||||||
|
export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
|
||||||
|
|
||||||
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
|
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user