2008-09-12 00:13:14 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006-2008 OpenWrt.org
|
2006-06-27 08:35:46 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2007-03-16 07:57:18 +08:00
|
|
|
|
2012-06-15 04:26:04 +08:00
|
|
|
__package_mk:=1
|
|
|
|
|
2007-03-16 07:57:18 +08:00
|
|
|
all: $(if $(DUMP),dumpinfo,compile)
|
2006-04-14 11:03:32 +08:00
|
|
|
|
2007-09-03 15:51:56 +08:00
|
|
|
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
|
2007-03-17 03:18:55 +08:00
|
|
|
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
|
2007-08-07 08:04:25 +08:00
|
|
|
PKG_MD5SUM ?= unknown
|
2010-08-18 21:57:58 +08:00
|
|
|
PKG_BUILD_PARALLEL ?=
|
2013-08-14 21:02:29 +08:00
|
|
|
PKG_USE_MIPS16 ?= 1
|
2010-10-17 02:42:58 +08:00
|
|
|
|
2012-09-15 18:21:24 +08:00
|
|
|
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
|
2012-09-15 20:16:14 +08:00
|
|
|
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
|
2012-09-15 18:21:24 +08:00
|
|
|
else
|
|
|
|
MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
|
|
|
|
endif
|
|
|
|
|
2010-10-17 02:42:58 +08:00
|
|
|
ifeq ($(strip $(PKG_BUILD_PARALLEL)),0)
|
|
|
|
PKG_JOBS?=-j1
|
|
|
|
else
|
2010-10-17 02:46:22 +08:00
|
|
|
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\
|
2012-09-15 18:21:24 +08:00
|
|
|
$(if $(CONFIG_PKG_BUILD_PARALLEL),$(MAKE_J),-j1),-j1)
|
2010-10-17 02:42:58 +08:00
|
|
|
endif
|
2013-08-14 22:55:49 +08:00
|
|
|
ifdef CONFIG_USE_MIPS16
|
2013-08-14 21:02:29 +08:00
|
|
|
ifeq ($(strip $(PKG_USE_MIPS16)),1)
|
|
|
|
TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
|
|
|
|
TARGET_CFLAGS += -mips16 -minterlink-mips16
|
|
|
|
endif
|
|
|
|
endif
|
2007-03-17 03:18:55 +08:00
|
|
|
|
2006-07-29 19:30:06 +08:00
|
|
|
include $(INCLUDE_DIR)/prereq.mk
|
2006-10-11 05:22:35 +08:00
|
|
|
include $(INCLUDE_DIR)/host.mk
|
2006-10-14 08:40:27 +08:00
|
|
|
include $(INCLUDE_DIR)/unpack.mk
|
2007-04-16 02:28:24 +08:00
|
|
|
include $(INCLUDE_DIR)/depends.mk
|
2006-07-29 19:30:06 +08:00
|
|
|
|
2011-03-03 08:17:08 +08:00
|
|
|
STAMP_NO_AUTOREBUILD=$(wildcard $(PKG_BUILD_DIR)/.no_autorebuild)
|
|
|
|
PREV_STAMP_PREPARED:=$(if $(STAMP_NO_AUTOREBUILD),$(wildcard $(PKG_BUILD_DIR)/.prepared*))
|
|
|
|
ifneq ($(PREV_STAMP_PREPARED),)
|
|
|
|
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
|
|
|
CONFIG_AUTOREBUILD:=
|
|
|
|
else
|
2012-06-15 04:26:00 +08:00
|
|
|
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))$(call confvar,$(PKG_PREPARED_DEPENDS)))
|
2011-03-03 08:17:08 +08:00
|
|
|
endif
|
2009-11-24 01:12:54 +08:00
|
|
|
STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
2011-11-06 03:09:40 +08:00
|
|
|
STAMP_CONFIGURED_WILDCARD=$(patsubst %_$(call confvar,$(PKG_CONFIG_DEPENDS)),%_*,$(STAMP_CONFIGURED))
|
2007-03-24 03:13:08 +08:00
|
|
|
STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
|
2007-11-21 06:43:38 +08:00
|
|
|
STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)_installed
|
2007-06-03 14:16:08 +08:00
|
|
|
|
2010-08-16 17:45:21 +08:00
|
|
|
STAGING_FILES_LIST:=$(PKG_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),).list
|
2011-10-10 00:33:59 +08:00
|
|
|
ifneq ($(if $(CONFIG_SRC_TREE_OVERRIDE),$(wildcard ./git-src)),)
|
|
|
|
USE_GIT_TREE:=1
|
|
|
|
QUILT:=1
|
|
|
|
endif
|
2010-08-16 17:45:21 +08:00
|
|
|
|
2012-10-07 00:01:06 +08:00
|
|
|
PKG_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR)))
|
2012-11-08 00:15:22 +08:00
|
|
|
PKG_INSTALL_STAMP:=$(PKG_INFO_DIR)/$(PKG_DIR_NAME).$(if $(BUILD_VARIANT),$(BUILD_VARIANT),default).install
|
2012-10-07 00:01:06 +08:00
|
|
|
|
2007-09-29 08:05:48 +08:00
|
|
|
include $(INCLUDE_DIR)/download.mk
|
2007-06-03 14:16:08 +08:00
|
|
|
include $(INCLUDE_DIR)/quilt.mk
|
|
|
|
include $(INCLUDE_DIR)/package-defaults.mk
|
|
|
|
include $(INCLUDE_DIR)/package-dumpinfo.mk
|
|
|
|
include $(INCLUDE_DIR)/package-ipkg.mk
|
2007-09-29 09:21:56 +08:00
|
|
|
include $(INCLUDE_DIR)/package-bin.mk
|
2007-12-27 10:11:07 +08:00
|
|
|
include $(INCLUDE_DIR)/autotools.mk
|
2007-06-03 14:16:08 +08:00
|
|
|
|
2007-07-31 05:14:08 +08:00
|
|
|
override MAKEFLAGS=
|
2009-01-08 09:49:11 +08:00
|
|
|
CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
|
2008-01-03 10:12:46 +08:00
|
|
|
CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
|
|
|
|
SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE))
|
2011-02-06 23:18:30 +08:00
|
|
|
PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
|
2012-06-11 23:07:51 +08:00
|
|
|
unexport QUIET
|
2006-10-19 23:25:58 +08:00
|
|
|
|
2007-07-31 02:39:20 +08:00
|
|
|
ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
|
2007-07-31 07:52:17 +08:00
|
|
|
ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
|
2007-06-12 01:19:43 +08:00
|
|
|
define Build/Autoclean
|
|
|
|
$(PKG_BUILD_DIR)/.dep_files: $(STAMP_PREPARED)
|
2009-04-28 00:02:21 +08:00
|
|
|
$(call rdep,${CURDIR} $(PKG_FILE_DEPENDS),$(STAMP_PREPARED),$(PKG_BUILD_DIR)/.dep_files,-x "*/.dep_*")
|
2007-09-01 13:20:21 +08:00
|
|
|
$(if $(filter prepare,$(MAKECMDGOALS)),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),,-x "*/.dep_*" -x "*/ipkg*"))
|
2007-06-12 01:19:43 +08:00
|
|
|
endef
|
|
|
|
endif
|
2007-04-16 02:28:24 +08:00
|
|
|
endif
|
|
|
|
|
2009-05-31 19:35:13 +08:00
|
|
|
ifeq ($(CONFIG_$(PKG_NAME)_USE_CUSTOM_SOURCE_DIR),y)
|
|
|
|
# disable load stage
|
|
|
|
PKG_SOURCE_URL:=
|
|
|
|
# add hook to install a link to customer source path of dedicated package
|
|
|
|
Hooks/Prepare/Pre += prepare_custom_source_directory
|
2012-07-25 18:34:06 +08:00
|
|
|
ifeq ($(filter autoreconf,$(Hooks/Configure/Pre)),)
|
|
|
|
Hooks/Configure/Pre += autoreconf_target
|
|
|
|
endif
|
2009-05-31 19:35:13 +08:00
|
|
|
# define empty default action
|
|
|
|
define Build/Prepare/Default
|
|
|
|
@:
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2007-09-29 08:05:48 +08:00
|
|
|
define Download/default
|
|
|
|
FILE:=$(PKG_SOURCE)
|
|
|
|
URL:=$(PKG_SOURCE_URL)
|
2007-11-01 06:37:56 +08:00
|
|
|
SUBDIR:=$(PKG_SOURCE_SUBDIR)
|
2007-09-29 08:05:48 +08:00
|
|
|
PROTO:=$(PKG_SOURCE_PROTO)
|
2008-07-31 10:43:33 +08:00
|
|
|
$(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
|
2011-03-22 07:02:06 +08:00
|
|
|
$(if $(PKG_MIRROR_MD5SUM),MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM))
|
2007-09-29 08:05:48 +08:00
|
|
|
VERSION:=$(PKG_SOURCE_VERSION)
|
|
|
|
MD5SUM:=$(PKG_MD5SUM)
|
|
|
|
endef
|
2007-07-31 07:52:17 +08:00
|
|
|
|
2011-10-10 00:33:59 +08:00
|
|
|
ifdef USE_GIT_TREE
|
|
|
|
define Build/Prepare/Default
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
ln -s $(CURDIR)/git-src $(PKG_BUILD_DIR)/.git
|
|
|
|
( cd $(PKG_BUILD_DIR); git checkout .)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2009-04-23 06:05:55 +08:00
|
|
|
define Build/Exports/Default
|
|
|
|
$(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p))
|
|
|
|
$(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr
|
|
|
|
$(1) : export PATH=$$(TARGET_PATH_PKG)
|
|
|
|
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
|
2011-02-07 00:04:33 +08:00
|
|
|
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
|
|
|
|
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
|
2011-03-16 03:58:32 +08:00
|
|
|
$(1) : export CCACHE_DIR:=$(STAGING_DIR)/ccache
|
2009-04-23 06:05:55 +08:00
|
|
|
endef
|
|
|
|
Build/Exports=$(Build/Exports/Default)
|
|
|
|
|
2006-04-14 11:03:32 +08:00
|
|
|
define Build/DefaultTargets
|
2007-09-29 12:29:11 +08:00
|
|
|
$(if $(QUILT),$(Build/Quilt))
|
2011-10-10 00:54:03 +08:00
|
|
|
$(if $(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
2007-04-16 02:28:24 +08:00
|
|
|
$(call Build/Autoclean)
|
2006-05-14 17:30:29 +08:00
|
|
|
|
2011-09-30 19:12:13 +08:00
|
|
|
download:
|
|
|
|
$(foreach hook,$(Hooks/Download),
|
|
|
|
$(call $(hook))$(sep)
|
|
|
|
)
|
|
|
|
|
2009-03-14 00:16:54 +08:00
|
|
|
$(STAMP_PREPARED) : export PATH=$$(TARGET_PATH_PKG)
|
2009-02-23 07:54:05 +08:00
|
|
|
$(STAMP_PREPARED):
|
2006-05-11 08:18:12 +08:00
|
|
|
@-rm -rf $(PKG_BUILD_DIR)
|
|
|
|
@mkdir -p $(PKG_BUILD_DIR)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Prepare/Pre),$(call $(hook))$(sep))
|
2007-03-16 07:57:18 +08:00
|
|
|
$(Build/Prepare)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Prepare/Post),$(call $(hook))$(sep))
|
2006-05-12 07:14:04 +08:00
|
|
|
touch $$@
|
2006-04-14 11:03:32 +08:00
|
|
|
|
2009-04-23 06:05:55 +08:00
|
|
|
$(call Build/Exports,$(STAMP_CONFIGURED))
|
2009-03-17 10:20:34 +08:00
|
|
|
$(STAMP_CONFIGURED): $(STAMP_PREPARED)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep))
|
2007-03-16 07:57:18 +08:00
|
|
|
$(Build/Configure)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep))
|
2011-11-06 03:09:40 +08:00
|
|
|
rm -f $(STAMP_CONFIGURED_WILDCARD)
|
2006-04-14 11:03:32 +08:00
|
|
|
touch $$@
|
|
|
|
|
2009-04-23 06:05:55 +08:00
|
|
|
$(call Build/Exports,$(STAMP_BUILT))
|
2007-03-24 03:13:08 +08:00
|
|
|
$(STAMP_BUILT): $(STAMP_CONFIGURED)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Compile/Pre),$(call $(hook))$(sep))
|
2007-03-16 07:57:18 +08:00
|
|
|
$(Build/Compile)
|
2007-12-27 10:11:07 +08:00
|
|
|
$(foreach hook,$(Hooks/Compile/Post),$(call $(hook))$(sep))
|
2008-09-01 19:03:58 +08:00
|
|
|
$(Build/Install)
|
|
|
|
$(foreach hook,$(Hooks/Install/Post),$(call $(hook))$(sep))
|
2007-11-21 06:43:38 +08:00
|
|
|
touch $$@
|
|
|
|
|
2009-03-14 00:16:54 +08:00
|
|
|
$(STAMP_INSTALLED) : export PATH=$$(TARGET_PATH_PKG)
|
2007-11-21 06:43:38 +08:00
|
|
|
$(STAMP_INSTALLED): $(STAMP_BUILT)
|
2008-06-09 23:38:45 +08:00
|
|
|
$(SUBMAKE) -j1 clean-staging
|
2007-12-25 09:39:15 +08:00
|
|
|
rm -rf $(TMP_DIR)/stage-$(PKG_NAME)
|
2007-12-27 10:10:54 +08:00
|
|
|
mkdir -p $(TMP_DIR)/stage-$(PKG_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
|
2008-09-12 00:13:14 +08:00
|
|
|
$(foreach hook,$(Hooks/InstallDev/Pre),\
|
|
|
|
$(call $(hook),$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)$(sep)\
|
|
|
|
)
|
2007-12-27 10:10:54 +08:00
|
|
|
$(call Build/InstallDev,$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)
|
2008-09-12 00:13:14 +08:00
|
|
|
$(foreach hook,$(Hooks/InstallDev/Post),\
|
2008-09-12 00:17:28 +08:00
|
|
|
$(call $(hook),$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)$(sep)\
|
2008-09-12 00:13:14 +08:00
|
|
|
)
|
2013-05-29 18:31:45 +08:00
|
|
|
if [ -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) ]; then \
|
|
|
|
$(SCRIPT_DIR)/clean-package.sh \
|
|
|
|
"$(STAGING_DIR)/packages/$(STAGING_FILES_LIST)" \
|
|
|
|
"$(STAGING_DIR)"; \
|
|
|
|
fi
|
2007-12-27 10:10:54 +08:00
|
|
|
if [ -d $(TMP_DIR)/stage-$(PKG_NAME) ]; then \
|
2010-11-04 20:42:37 +08:00
|
|
|
(cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(TMP_DIR)/stage-$(PKG_NAME).files); \
|
2010-11-04 20:28:55 +08:00
|
|
|
$(call locked, \
|
2010-11-04 20:42:37 +08:00
|
|
|
mv $(TMP_DIR)/stage-$(PKG_NAME).files $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) && \
|
2010-11-04 20:28:55 +08:00
|
|
|
$(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \
|
|
|
|
,staging-dir); \
|
2007-12-25 09:39:15 +08:00
|
|
|
fi
|
2007-12-25 10:19:48 +08:00
|
|
|
rm -rf $(TMP_DIR)/stage-$(PKG_NAME)
|
2006-05-14 17:30:29 +08:00
|
|
|
touch $$@
|
2006-06-01 00:20:27 +08:00
|
|
|
|
2006-08-02 20:07:14 +08:00
|
|
|
ifdef Build/InstallDev
|
2007-11-21 06:43:38 +08:00
|
|
|
compile: $(STAMP_INSTALLED)
|
2006-06-01 08:06:16 +08:00
|
|
|
endif
|
2006-06-01 00:20:27 +08:00
|
|
|
|
2006-05-12 06:36:20 +08:00
|
|
|
define Build/DefaultTargets
|
|
|
|
endef
|
2007-11-16 11:48:43 +08:00
|
|
|
|
|
|
|
prepare: $(STAMP_PREPARED)
|
|
|
|
configure: $(STAMP_CONFIGURED)
|
2009-05-31 20:01:05 +08:00
|
|
|
dist: $(STAMP_CONFIGURED)
|
|
|
|
distcheck: $(STAMP_CONFIGURED)
|
2006-04-14 11:03:32 +08:00
|
|
|
endef
|
2005-07-25 03:58:14 +08:00
|
|
|
|
2009-08-31 09:11:25 +08:00
|
|
|
define Build/IncludeOverlay
|
|
|
|
$(eval -include $(wildcard $(TOPDIR)/overlay/*/$(PKG_NAME).mk))
|
|
|
|
define Build/IncludeOverlay
|
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
2006-04-20 07:56:04 +08:00
|
|
|
define BuildPackage
|
2009-08-31 09:11:25 +08:00
|
|
|
$(Build/IncludeOverlay)
|
2007-03-16 07:57:18 +08:00
|
|
|
$(eval $(Package/Default))
|
|
|
|
$(eval $(Package/$(1)))
|
|
|
|
|
2007-10-14 12:49:05 +08:00
|
|
|
ifdef DESCRIPTION
|
2009-02-22 12:36:56 +08:00
|
|
|
$$(error DESCRIPTION:= is obsolete, use Package/PKG_NAME/description)
|
2007-10-14 12:49:05 +08:00
|
|
|
endif
|
|
|
|
|
2007-03-16 07:57:18 +08:00
|
|
|
ifndef Package/$(1)/description
|
|
|
|
define Package/$(1)/description
|
2007-10-14 12:49:05 +08:00
|
|
|
$(TITLE)
|
2007-03-16 07:57:18 +08:00
|
|
|
endef
|
|
|
|
endif
|
2006-04-14 09:22:55 +08:00
|
|
|
|
2012-12-23 03:56:21 +08:00
|
|
|
$(foreach FIELD, TITLE CATEGORY SECTION VERSION,
|
2006-05-12 06:36:20 +08:00
|
|
|
ifeq ($($(FIELD)),)
|
|
|
|
$$(error Package/$(1) is missing the $(FIELD) field)
|
|
|
|
endif
|
|
|
|
)
|
2006-05-11 08:18:12 +08:00
|
|
|
|
2007-03-16 07:57:18 +08:00
|
|
|
$(call shexport,Package/$(1)/description)
|
|
|
|
$(call shexport,Package/$(1)/config)
|
2006-10-10 23:45:36 +08:00
|
|
|
|
2007-09-28 09:23:56 +08:00
|
|
|
$(if $(DUMP), \
|
2009-10-18 06:11:21 +08:00
|
|
|
$(Dumpinfo/Package), \
|
2007-09-28 09:23:56 +08:00
|
|
|
$(foreach target, \
|
|
|
|
$(if $(Package/$(1)/targets),$(Package/$(1)/targets), \
|
2010-02-25 07:43:05 +08:00
|
|
|
$(if $(PKG_TARGETS),$(PKG_TARGETS), ipkg) \
|
2007-09-28 09:23:56 +08:00
|
|
|
), $(BuildTarget/$(target)) \
|
|
|
|
) \
|
|
|
|
)
|
2009-03-17 10:37:04 +08:00
|
|
|
$(if $(PKG_HOST_ONLY)$(DUMP),,$(call Build/DefaultTargets,$(1)))
|
2006-04-14 11:03:32 +08:00
|
|
|
endef
|
2005-10-22 09:40:50 +08:00
|
|
|
|
2007-10-07 09:55:03 +08:00
|
|
|
define pkg_install_files
|
2007-10-21 03:13:53 +08:00
|
|
|
$(foreach install_file,$(1),$(INSTALL_DIR) $(3)/`dirname $(install_file)`; $(INSTALL_DATA) $(2)/$(install_file) $(3)/`dirname $(install_file)`;)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define pkg_install_bin
|
2007-12-18 06:24:40 +08:00
|
|
|
$(foreach install_apps,$(1),$(INSTALL_DIR) $(3)/`dirname $(install_apps)`; $(INSTALL_BIN) $(2)/$(install_apps) $(3)/`dirname $(install_apps)`;)
|
2007-10-07 09:55:03 +08:00
|
|
|
endef
|
|
|
|
|
2008-09-03 21:19:50 +08:00
|
|
|
Build/Prepare=$(call Build/Prepare/Default,)
|
|
|
|
Build/Configure=$(call Build/Configure/Default,)
|
|
|
|
Build/Compile=$(call Build/Compile/Default,)
|
|
|
|
Build/Install=$(if $(PKG_INSTALL),$(call Build/Install/Default,))
|
2009-05-31 20:01:05 +08:00
|
|
|
Build/Dist=$(call Build/Dist/Default,)
|
|
|
|
Build/DistCheck=$(call Build/DistCheck/Default,)
|
2005-04-18 14:17:39 +08:00
|
|
|
|
2012-09-17 19:17:26 +08:00
|
|
|
.NOTPARALLEL:
|
|
|
|
|
2012-10-07 00:01:06 +08:00
|
|
|
.PHONY: prepare-package-install
|
|
|
|
prepare-package-install:
|
2012-10-07 06:42:57 +08:00
|
|
|
@mkdir -p $(PKG_INFO_DIR)
|
2012-11-08 00:15:22 +08:00
|
|
|
@touch $(PKG_INSTALL_STAMP).clean
|
|
|
|
@echo "$(filter-out essential,$(PKG_FLAGS))" > $(PKG_INSTALL_STAMP).flags
|
2012-10-07 00:01:06 +08:00
|
|
|
|
2007-03-16 07:57:18 +08:00
|
|
|
$(PACKAGE_DIR):
|
2006-05-11 04:32:22 +08:00
|
|
|
mkdir -p $@
|
2007-12-25 09:39:15 +08:00
|
|
|
|
2007-03-16 07:57:18 +08:00
|
|
|
dumpinfo:
|
|
|
|
download:
|
2007-11-16 11:48:43 +08:00
|
|
|
prepare:
|
|
|
|
configure:
|
2012-10-07 00:01:06 +08:00
|
|
|
compile: prepare-package-install
|
|
|
|
install: compile
|
2007-12-25 09:39:15 +08:00
|
|
|
clean-staging: FORCE
|
|
|
|
rm -f $(STAMP_INSTALLED)
|
2007-12-27 10:10:54 +08:00
|
|
|
@-(\
|
|
|
|
cd "$(STAGING_DIR)"; \
|
2010-08-16 17:45:21 +08:00
|
|
|
if [ -f packages/$(STAGING_FILES_LIST) ]; then \
|
|
|
|
cat packages/$(STAGING_FILES_LIST) | xargs -r rm -f 2>/dev/null; \
|
2007-12-25 09:39:15 +08:00
|
|
|
fi; \
|
2007-12-27 10:10:54 +08:00
|
|
|
)
|
2007-12-25 09:39:15 +08:00
|
|
|
|
|
|
|
clean: clean-staging FORCE
|
2007-12-23 08:41:40 +08:00
|
|
|
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR_HOST))
|
2007-03-31 21:45:50 +08:00
|
|
|
$(Build/Clean)
|
2010-08-16 17:45:21 +08:00
|
|
|
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) $(STAGING_DIR_HOST)/packages/$(STAGING_FILES_LIST)
|
2007-12-25 09:39:15 +08:00
|
|
|
rm -rf $(PKG_BUILD_DIR)
|
2009-05-31 20:01:05 +08:00
|
|
|
|
|
|
|
dist:
|
|
|
|
$(Build/Dist)
|
|
|
|
|
|
|
|
distcheck:
|
|
|
|
$(Build/DistCheck)
|