|  | @ -222,12 +222,11 @@ PKG_NO_INSTALL = pkg-no-install | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # clean-up
 |  |  | # clean-up
 | 
			
		
	
		
		
			
				
					|  |  | define CLEANUP |  |  | define CLEANUP | 
			
		
	
		
		
			
				
					|  |  | 	$(Q)( \
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 	if [ "$($(PKG)_DIR)" ]; then \
 |  |  | 	if [ "$($(PKG)_DIR)" ]; then \
 | 
			
		
	
		
		
			
				
					|  |  | 		$(call MESSAGE,"Clean-up $(pkgname)"); \
 |  |  | 		$(call MESSAGE,"Clean-up $(pkgname)"); \
 | 
			
		
	
		
		
			
				
					
					|  |  | 		rm -rf $(BUILD_DIR)/$($(PKG)_DIR); \
 |  |  | 		$(CD) $(BUILD_DIR); \
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	fi; \
 |  |  | 			rm -rf $($(PKG)_DIR); \
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	) |  |  | 	fi | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # -----------------------------------------------------------------------------
 |  |  | # -----------------------------------------------------------------------------
 | 
			
		
	
	
		
		
			
				
					|  | @ -235,7 +234,7 @@ endef | 
			
		
	
		
		
			
				
					|  |  | # start-up build
 |  |  | # start-up build
 | 
			
		
	
		
		
			
				
					|  |  | define STARTUP |  |  | define STARTUP | 
			
		
	
		
		
			
				
					|  |  | 	@$(call MESSAGE,"Start-up build $(pkgname)") |  |  | 	@$(call MESSAGE,"Start-up build $(pkgname)") | 
			
		
	
		
		
			
				
					
					|  |  | 	$(call CLEANUP) |  |  | 	$(Q)$(call CLEANUP) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # -----------------------------------------------------------------------------
 |  |  | # -----------------------------------------------------------------------------
 | 
			
		
	
	
		
		
			
				
					|  | @ -393,15 +392,13 @@ REWRITE_LIBTOOL_RULES = "s,^libdir=.*,libdir='$(1)',; \ | 
			
		
	
		
		
			
				
					|  |  | REWRITE_LIBTOOL_TAG = rewritten=1 |  |  | REWRITE_LIBTOOL_TAG = rewritten=1 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | define rewrite_libtool # (libdir)
 |  |  | define rewrite_libtool # (libdir)
 | 
			
		
	
		
		
			
				
					|  |  | 	$(Q)( \
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 	for la in $$(find $(1) -name "*.la" -type f); do \
 |  |  | 	for la in $$(find $(1) -name "*.la" -type f); do \
 | 
			
		
	
		
		
			
				
					|  |  | 		if ! grep -q "$(REWRITE_LIBTOOL_TAG)" $${la}; then \
 |  |  | 		if ! grep -q "$(REWRITE_LIBTOOL_TAG)" $${la}; then \
 | 
			
		
	
		
		
			
				
					|  |  | 			$(call MESSAGE,"Rewriting $${la#$(TARGET_DIR)/}"); \
 |  |  | 			$(call MESSAGE,"Rewriting $${la#$(TARGET_DIR)/}"); \
 | 
			
		
	
		
		
			
				
					|  |  | 			$(SED) $(REWRITE_LIBTOOL_RULES) $${la}; \
 |  |  | 			$(SED) $(REWRITE_LIBTOOL_RULES) $${la}; \
 | 
			
		
	
		
		
			
				
					|  |  | 			echo -e "\n# Adapted to buildsystem\n$(REWRITE_LIBTOOL_TAG)" >> $${la}; \
 |  |  | 			echo -e "\n# Adapted to buildsystem\n$(REWRITE_LIBTOOL_TAG)" >> $${la}; \
 | 
			
		
	
		
		
			
				
					|  |  | 		fi; \
 |  |  | 		fi; \
 | 
			
		
	
		
		
			
				
					
					|  |  | 	done; \
 |  |  | 	done | 
			
				
				
			
		
	
		
		
			
				
					|  |  | 	) |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # rewrite libtool libraries automatically
 |  |  | # rewrite libtool libraries automatically
 | 
			
		
	
	
		
		
			
				
					|  | @ -419,11 +416,9 @@ REWRITE_CONFIG_RULES = "s,^prefix=.*,prefix='$(TARGET_prefix)',; \ | 
			
		
	
		
		
			
				
					|  |  | 			s,^includedir=.*,includedir='$(TARGET_includedir)',"
 |  |  | 			s,^includedir=.*,includedir='$(TARGET_includedir)',"
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | define rewrite_config_script # (config-script)
 |  |  | define rewrite_config_script # (config-script)
 | 
			
		
	
		
		
			
				
					
					|  |  | 	$(Q)( \
 |  |  | 	mv $(TARGET_bindir)/$(1) $(HOST_DIR)/bin | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	mv $(TARGET_bindir)/$(1) $(HOST_DIR)/bin; \
 |  |  | 	$(call MESSAGE,"Rewriting $(1)") | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	$(call MESSAGE,"Rewriting $(1)"); \
 |  |  | 	$(SED) $(REWRITE_CONFIG_RULES) $(HOST_DIR)/bin/$(1) | 
			
				
				
			
		
	
		
		
			
				
					|  |  | 	$(SED) $(REWRITE_CONFIG_RULES) $(HOST_DIR)/bin/$(1); \
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 	) |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # rewrite config scripts automatically
 |  |  | # rewrite config scripts automatically
 | 
			
		
	
	
		
		
			
				
					|  | @ -435,7 +430,7 @@ endef | 
			
		
	
		
		
			
				
					|  |  | # -----------------------------------------------------------------------------
 |  |  | # -----------------------------------------------------------------------------
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | define TOUCH |  |  | define TOUCH | 
			
		
	
		
		
			
				
					
					|  |  | 	$(Q)touch $(if $(findstring host-,$(@)),$(HOST_DEPS_DIR),$(DEPS_DIR))/$(@) |  |  | 	touch $(if $(findstring host-,$(@)),$(HOST_DEPS_DIR),$(DEPS_DIR))/$(@) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # -----------------------------------------------------------------------------
 |  |  | # -----------------------------------------------------------------------------
 | 
			
		
	
	
		
		
			
				
					|  | @ -444,19 +439,19 @@ endef | 
			
		
	
		
		
			
				
					|  |  | define HOST_FOLLOWUP |  |  | define HOST_FOLLOWUP | 
			
		
	
		
		
			
				
					|  |  | 	@$(call MESSAGE,"Follow-up build $(pkgname)") |  |  | 	@$(call MESSAGE,"Follow-up build $(pkgname)") | 
			
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_PRE_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_PRE_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					
					|  |  | 	$(call CLEANUP) |  |  | 	$(Q)$(call CLEANUP) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_HOST_FINALIZE_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_HOST_FINALIZE_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_POST_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_POST_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					
					|  |  | 	$(call TOUCH) |  |  | 	$(Q)$(call TOUCH) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | define TARGET_FOLLOWUP |  |  | define TARGET_FOLLOWUP | 
			
		
	
		
		
			
				
					|  |  | 	@$(call MESSAGE,"Follow-up build $(pkgname)") |  |  | 	@$(call MESSAGE,"Follow-up build $(pkgname)") | 
			
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_PRE_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_PRE_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					
					|  |  | 	$(call REWRITE_CONFIG_SCRIPTS) |  |  | 	$(Q)$(call REWRITE_CONFIG_SCRIPTS) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	$(call REWRITE_LIBTOOL) |  |  | 	$(Q)$(call REWRITE_LIBTOOL) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 	$(call CLEANUP) |  |  | 	$(Q)$(call CLEANUP) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_TARGET_FINALIZE_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_TARGET_FINALIZE_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					|  |  | 	$(foreach hook,$($(PKG)_POST_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) |  |  | 	$(foreach hook,$($(PKG)_POST_FOLLOWUP_HOOKS),$(call $(hook))$(sep)) | 
			
		
	
		
		
			
				
					
					|  |  | 	$(call TOUCH) |  |  | 	$(Q)$(call TOUCH) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | endef |  |  | endef | 
			
		
	
	
		
		
			
				
					|  | 
 |