Remove 2.6.22 kernel configuration file
[openwrt.git] / include / autotools.mk
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 define replace
10 if [ -f "$(PKG_BUILD_DIR)/$(3)$(1)" -a -e "$(2)/$(1)" ]; then \
11 rm -f $(PKG_BUILD_DIR)/$(3)$(1); \
12 ln -s $(2)/$(1) $(PKG_BUILD_DIR)/$(3); \
13 fi
14
15 endef
16
17 # replace copies of ltmain.sh with the build system's version
18 update_libtool=$(call replace,libtool,$(STAGING_DIR)/host/bin,$(CONFIGURE_PATH)/)$(call replace,ltmain.sh,$(STAGING_DIR)/host/share/libtool,$(CONFIGURE_PATH)/)$(call replace,libtool.m4,$(STAGING_DIR)/host/share/aclocal,$(CONFIGURE_PATH)/)
19
20 # prevent libtool from linking against host development libraries
21 define libtool_fixup_libdir
22 find $(1) -name '*.la' | $(XARGS) \
23 $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g"
24 find $(2) -name '*.la' | $(XARGS) \
25 $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g"
26 endef
27
28 define remove_version_check
29 if [ -f "$(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure" ]; then \
30 $(SED) \
31 's,pardus_ltmain_version=.*,pardus_ltmain_version="$$$$pardus_lt_version",' \
32 $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure; \
33 fi
34 endef
35
36 ifneq ($(filter libtool,$(PKG_FIXUP)),)
37 PKG_BUILD_DEPENDS += libtool
38 Hooks/Configure/Pre += update_libtool remove_version_check
39 Hooks/Configure/Post += update_libtool
40 Hooks/InstallDev/Post += libtool_fixup_libdir
41 endif
This page took 0.055194 seconds and 5 git commands to generate.