some minor fixes, cleanups, package build abstraction

SVN-Revision: 9051
This commit is contained in:
Felix Fietkau 2007-09-28 01:23:56 +00:00
parent bb402acf61
commit 800ef0f56c
5 changed files with 23 additions and 9 deletions

View File

@ -23,7 +23,7 @@ define BuildIPKGVariable
endef endef
ifeq ($(DUMP),) ifeq ($(DUMP),)
define BuildIPKG define BuildTarget/ipkg
IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1)
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
@ -92,9 +92,6 @@ ifeq ($(DUMP),)
$(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(STAMP_PREPARED) $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(STAMP_PREPARED)
-@rm -f $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null -@rm -f $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null
@touch $$@ @touch $$@
$$(eval $$(call Build/DefaultTargets,$(1)))
endef endef
$(STAGING_DIR)/etc/ipkg.conf: $(STAGING_DIR)/etc/ipkg.conf:

View File

@ -97,8 +97,15 @@ endif
$(call shexport,Package/$(1)/description) $(call shexport,Package/$(1)/description)
$(call shexport,Package/$(1)/config) $(call shexport,Package/$(1)/config)
$(Dumpinfo) $(if $(DUMP), \
$(BuildIPKG) $(Dumpinfo), \
$(foreach target, \
$(if $(Package/$(1)/targets),$(Package/$(1)/targets), \
$(if $(PKG_TARGETS),$(PKG_TARGETS), ipkg ) \
), $(BuildTarget/$(target)) \
) \
)
$(if $(DUMP),,$(call Build/DefaultTargets,$(1)))
endef endef
# prevent libtool from setting rpath when linking # prevent libtool from setting rpath when linking

View File

@ -5,6 +5,9 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
ifneq ($(__prereq_inc),1)
__prereq_inc:=1
prereq: prereq:
if [ -f $(TMP_DIR)/.prereq-error ]; then \ if [ -f $(TMP_DIR)/.prereq-error ]; then \
echo; \ echo; \
@ -15,6 +18,7 @@ prereq:
fi fi
.SILENT: prereq .SILENT: prereq
endif
define Require define Require
export PREREQ_CHECK=1 export PREREQ_CHECK=1

View File

@ -5,6 +5,9 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
ifneq ($(__quilt_inc),1)
__quilt_inc:=1
ifeq ($(TARGET_BUILD),1) ifeq ($(TARGET_BUILD),1)
PKG_BUILD_DIR:=$(LINUX_DIR) PKG_BUILD_DIR:=$(LINUX_DIR)
endif endif
@ -134,3 +137,4 @@ refresh: quilt-check
update: quilt-check update: quilt-check
$(if $(KERNEL_BUILD),$(Quilt/Refresh/Kernel),$(Quilt/Refresh/Package)) $(if $(KERNEL_BUILD),$(Quilt/Refresh/Kernel),$(Quilt/Refresh/Package))
endif

View File

@ -75,9 +75,11 @@ define Profile
endif endif
endef endef
-include $(PLATFORM_DIR)/profiles/*.mk ifeq ($(DUMP)$(if $(TARGET_BUILD),,1),)
ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR)) -include $(PLATFORM_DIR)/profiles/*.mk
-include $(PLATFORM_SUBDIR)/profiles/*.mk ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
-include $(PLATFORM_SUBDIR)/profiles/*.mk
endif
endif endif
$(eval $(call shexport,Target/Description)) $(eval $(call shexport,Target/Description))