Hi all,

the current Build/Install/Default definition is as follows
(https://dev.openwrt.org/browser/trunk/include/package-defaults.mk#L121):

define Build/Install/Default
        $(MAKE_VARS) \
        $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
                $(MAKE_INSTALL_FLAGS) \
                $(1) install;
endef

It is only called in trunk/include/package.mk
(https://dev.openwrt.org/browser/trunk/include/package.mk#L199):

Build/Install=$(if $(PKG_INSTALL),$(call Build/Install/Default,))

without a parameter.

Otherwise, the only package calling this is 'check':
packages/libs/check/Makefile (line 47)

also without a parameter.


The attached patch replaces '$(1) install' by '$(if $(1), $(1),
install)' in the definition, in order to be able to specify an install
rule, which is not always called 'install' (example:
trunk/package/ncurses/Makefile has rules called 'install.libs' and
'install.data').

Then it's possible to do this in ncurses Makefile:

define Build/Install
        $(call Build/Install/Default, install.libs install.data)
endef

This patch does not affect anything else, as if no parameter is given,
it will use 'install' as before.

-Raphael
diff -pruN trunk.orig/include/package-defaults.mk trunk/include/package-defaults.mk
--- trunk.orig/include/package-defaults.mk	2010-03-04 15:43:17.000000000 +0100
+++ trunk/include/package-defaults.mk	2010-03-04 15:44:11.000000000 +0100
@@ -122,7 +122,7 @@ define Build/Install/Default
 	$(MAKE_VARS) \
 	$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
 		$(MAKE_INSTALL_FLAGS) \
-		$(1) install;
+		$(if $(1), $(1), install);
 endef
 
 define Build/Dist/Default
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to