Changeset 15339


Ignore:
Timestamp:
2009-04-23T00:05:55+02:00 (9 years ago)
Author:
nbd
Message:

clean up automake/pkg-config handling, move separate host/package variable exports to templates, fix automake path for host builds

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/host-build.mk

    r15299 r15339  
    104104endef 
    105105 
     106define Host/Exports/Default 
     107  $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*),-I $$(p)) 
     108  $(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST) 
     109  $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig 
     110  $(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig 
     111endef 
     112Host/Exports=$(Host/Exports/Default) 
     113 
    106114ifndef DUMP 
    107115  define HostBuild 
     
    116124        touch $$@ 
    117125 
    118   $(HOST_STAMP_CONFIGURED) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig 
    119   $(HOST_STAMP_CONFIGURED) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig 
     126  $(call Host/Exports,$(STAMP_CONFIGURED)) 
    120127  $(HOST_STAMP_CONFIGURED): $(HOST_STAMP_PREPARED) 
    121128        $(call Host/Configure) 
    122129        touch $$@ 
    123130 
     131  $(call Host/Exports,$(STAMP_BUILT)) 
    124132  $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) 
    125133        $(call Host/Compile) 
  • trunk/include/package.mk

    r15299 r15339  
    6363endef 
    6464 
     65define Build/Exports/Default 
     66  $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p)) 
     67  $(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr 
     68  $(1) : export PATH=$$(TARGET_PATH_PKG) 
     69  $(1) : export CONFIG_SITE:=$$(CONFIG_SITE) 
     70  $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR)/usr/lib/pkgconfig 
     71  $(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR)/usr/lib/pkgconfig 
     72endef 
     73Build/Exports=$(Build/Exports/Default) 
     74 
    6575define Build/DefaultTargets 
    6676  $(if $(QUILT),$(Build/Quilt)) 
     
    7787        touch $$@ 
    7888 
    79   $(STAMP_CONFIGURED) : export PATH=$$(TARGET_PATH_PKG) 
    80   $(STAMP_CONFIGURED) : export CONFIG_SITE:=$$(CONFIG_SITE) 
    81   $(STAMP_CONFIGURED) : export PKG_CONFIG_PATH=$$(STAGING_DIR)/usr/lib/pkgconfig 
    82   $(STAMP_CONFIGURED) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR)/usr/lib/pkgconfig 
     89  $(call Build/Exports,$(STAMP_CONFIGURED)) 
    8390  $(STAMP_CONFIGURED): $(STAMP_PREPARED) 
    8491        $(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep)) 
     
    8794        touch $$@ 
    8895 
    89   $(STAMP_BUILT) : export PATH=$$(TARGET_PATH_PKG) 
    90   $(STAMP_BUILT) : export CONFIG_SITE:=$$(CONFIG_SITE) 
    91   $(STAMP_BUILT) : export PKG_CONFIG_PATH=$$(STAGING_DIR)/usr/lib/pkgconfig:$$(STAGING_DIR_HOST)/usr/lib/pkgconfig 
    92   $(STAMP_BUILT) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR)/usr/lib/pkgconfig 
     96  $(call Build/Exports,$(STAMP_BUILT)) 
    9397  $(STAMP_BUILT): $(STAMP_CONFIGURED) 
    9498        $(foreach hook,$(Hooks/Compile/Pre),$(call $(hook))$(sep)) 
  • trunk/tools/automake/files/aclocal

    r12934 r15339  
    11#!/usr/bin/env sh 
    2 if [ -d ${STAGING_DIR}/host/share/aclocal ]; then 
    3     aclocal_include_dirs="-I ${STAGING_DIR}/host/share/aclocal" 
    4 else 
    5     aclocal_include_dirs= 
    6 fi 
    7 if [ -d ${STAGING_DIR}/usr/share/aclocal ]; then 
    8     aclocal_include_dirs="$aclocal_include_dirs -I ${STAGING_DIR}/usr/share/aclocal" 
    9 fi 
    10 aclocal.real $aclocal_include_dirs $@ 
     2aclocal.real $ACLOCAL_INCLUDE $@ 
  • trunk/tools/pkg-config/files/pkg-config

    r12946 r15339  
    11#!/bin/sh 
    22 
    3 pkg-config.real $@ --define-variable=prefix=${STAGING_DIR}/usr/ --define-variable=exec_prefix=${STAGING_DIR}/usr/ 
     3pkg-config.real $@ --define-variable=prefix=${STAGING_PREFIX}/ --define-variable=exec_prefix=${STAGING_PREFIX}/ 
Note: See TracChangeset for help on using the changeset viewer.