source: trunk/include/autotools.mk @ 15242

Last change on this file since 15242 was 15242, checked in by nbd, 7 years ago

get rid of $Id$ - it has never helped us and it has broken too many patches ;)

  • Property copyright set to Copyright (C) 2007-2008 Openwrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
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
8define replace
9        if [ -f "$(PKG_BUILD_DIR)/$(3)$(1)" -a -e "$(2)/$(1)" ]; then \
10                rm -f $(PKG_BUILD_DIR)/$(3)$(1); \
11                ln -s $(2)/$(1) $(PKG_BUILD_DIR)/$(3); \
12        fi
13       
14endef
15
16# replace copies of ltmain.sh with the build system's version
17update_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)/)
18
19# prevent libtool from linking against host development libraries
20define libtool_fixup_libdir
21        find $(1) -name '*.la' | $(XARGS) \
22                $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g"
23        find $(2) -name '*.la' | $(XARGS) \
24                $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g"
25endef
26
27define remove_version_check
28        if [ -f "$(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure" ]; then \
29                $(SED) \
30                        's,pardus_ltmain_version=.*,pardus_ltmain_version="$$$$pardus_lt_version",' \
31                        $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure; \
32        fi
33endef
34
35ifneq ($(filter libtool,$(PKG_FIXUP)),)
36  PKG_BUILD_DEPENDS += libtool
37  Hooks/Configure/Pre += update_libtool remove_version_check
38  Hooks/Configure/Post += update_libtool
39  Hooks/InstallDev/Post += libtool_fixup_libdir
40endif
Note: See TracBrowser for help on using the repository browser.