Changeset 24317


Ignore:
Timestamp:
2010-12-08T01:54:14+01:00 (7 years ago)
Author:
jow
Message:

[include] deploy the steamroller tactics and autoreconfigure any package carring the libtool fixup,
this should solve a number of issues ranging from linking into the host, syntax errors in libtool and
missing make targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/autotools.mk

    r24246 r24317  
    66# 
    77 
    8 define replace 
    9         if [ -f "$(PKG_BUILD_DIR)/$(3)$(1)" -a -e "$(2)/$(if $(4),$(4),$(1))" ]; then \ 
    10                 rm -f $(PKG_BUILD_DIR)/$(3)$(1); \ 
    11                 ln -s $(2)/$(if $(4),$(4),$(1)) $(PKG_BUILD_DIR)/$(3)$(1); \ 
    12         fi 
    13          
    14 endef 
    15  
    168PKG_LIBTOOL_PATHS?=$(CONFIGURE_PATH) 
    17  
    18 # replace copies of ltmain.sh with the build system's version 
    19 update_libtool_common = \ 
    20         $(foreach p,$(LIBTOOL_PATHS), \ 
    21                 $(call replace,ltmain.sh,$(STAGING_DIR)/host/share/libtool,$(p)/) \ 
    22                 $(call replace,libtool.m4,$(STAGING_DIR)/host/share/aclocal,$(p)/) \ 
    23         ) 
    24 update_libtool = \ 
    25         $(foreach p,$(PKG_LIBTOOL_PATHS), \ 
    26                 $(call replace,libtool,$(STAGING_DIR)/host/bin,$(p)/) \ 
    27         ) \ 
    28         $(call update_libtool_common) 
    29 update_libtool_ucxx = \ 
    30         $(foreach p,$(PKG_LIBTOOL_PATHS), \ 
    31                 $(call replace,libtool,$(STAGING_DIR)/host/bin,$(p)/,libtool-ucxx) \ 
    32         ) \ 
    33         $(call update_libtool_common) 
    349 
    3510autoconf_bool = $(patsubst %,$(if $($(1)),--enable,--disable)-%,$(2)) 
     
    3914        find $(1) -name '*.la' | $(XARGS) \ 
    4015                $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" \ 
    41                     -e "s,$(STAGING_DIR)/usr/lib/\(libstdc++\|libsupc++\).la,$(TOOLCHAIN_DIR)/lib/\1.la,g" 
    42 endef 
    43  
    44 define remove_version_check 
    45         if [ -f "$(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure" ]; then \ 
    46                 $(SED) \ 
    47                         's,\(gentoo\|pardus\)_ltmain_version=.*,\1_ltmain_version="$$$$\1_lt_version",' \ 
    48                         $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure; \ 
    49         fi 
     16                    -e "s,$(STAGING_DIR)/usr/lib/\(libstdc++\|libsupc++\).la,$(TOOLCHAIN_DIR)/lib/\1.la,g"; 
    5017endef 
    5118 
     
    5320# Makefiles, since backfire still uses libtool v1.5.x which (may) require those files 
    5421define libtool_remove_files 
    55         find $(1) -name '*.la' | $(XARGS) rm -f 
     22        find $(1) -name '*.la' | $(XARGS) rm -f; 
     23endef 
     24 
     25define autoreconf 
     26        (cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s $(patsubst %,-I %,$(PKG_LIBTOOL_PATHS)) $(PKG_LIBTOOL_PATHS)); 
    5627endef 
    5728 
     
    5930 
    6031ifneq ($(filter libtool,$(PKG_FIXUP)),) 
    61   # WARNING: the use of PKG_FIXUP is DEPRECATED 
    6232  PKG_BUILD_DEPENDS += libtool 
     33  Hooks/Configure/Pre += autoreconf 
     34  Hooks/InstallDev/Post += libtool_fixup_libdir 
    6335endif 
    6436  
    6537ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),) 
    66   # WARNING: the use of PKG_FIXUP is DEPRECATED 
    6738  PKG_BUILD_DEPENDS += libtool 
     39  Hooks/Configure/Pre += autoreconf 
     40  Hooks/InstallDev/Post += libtool_fixup_libdir 
    6841endif 
    6942 
Note: See TracChangeset for help on using the changeset viewer.