add $(STAGING_DIR) as argument to the InstallDev template and update packages accordi...
[openwrt/svn-archive/archive.git] / include / package.mk
index 074c7aded18aea6471e196c0093acc025444ed4d..2b93972f24360cc29fb9acd5257883cac5301eed 100644 (file)
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/host.mk
 include $(INCLUDE_DIR)/unpack.mk
 include $(INCLUDE_DIR)/depends.mk
 
-STAMP_PREPARED:=$(PKG_BUILD_DIR)/.prepared$(if $(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),)))
+STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),)))
 STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured
 STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
 
@@ -64,7 +64,7 @@ define Build/DefaultTargets
 
   $(STAMP_BUILT): $(STAMP_CONFIGURED)
        $(Build/Compile)
-       $(Build/InstallDev)
+       $(call Build/InstallDev,$(STAGING_DIR))
        touch $$@
 
   ifdef Build/InstallDev
@@ -97,8 +97,15 @@ endif
   $(call shexport,Package/$(1)/description)
   $(call shexport,Package/$(1)/config)
 
-  $(Dumpinfo)
-  $(BuildIPKG)
+  $(if $(DUMP), \
+    $(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
 
 # prevent libtool from setting rpath when linking
@@ -125,15 +132,6 @@ define Build/Compile
   $(call Build/Compile/Default,)
 endef
 
-define Build/Compile/PyMod
- cd $(PKG_BUILD_DIR); \
- $(1) \
- CFLAGS='-I$(STAGING_DIR)/usr/include' \
- LDFLAGS='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib' \
- $(STAGING_DIR)/usr/bin/hostpython ./setup.py $(2) \
- --prefix=$(PKG_INSTALL_DIR)/usr
-endef
-
 $(PACKAGE_DIR):
        mkdir -p $@
                
@@ -144,7 +142,7 @@ configure: $(STAMP_CONFIGURED)
 compile:
 install:
 clean: FORCE
-       $(Build/UninstallDev)
+       $(call Build/UninstallDev,$(STAGING_DIR))
        $(Build/Clean)
        @rm -f $(STAGING_DIR)/stamp/.$(PKG_NAME)-installed
        @rm -rf $(PKG_BUILD_DIR)