Changeset 1697


Ignore:
Timestamp:
Jan 6, 2009, 5:42:41 PM (12 years ago)
Author:
Peter
Message:

Add support for using uninstalled yat-config. Options --cppflags and
--link-libtool now work prior installation. --ldflags is not supported
because I'm not sure how to link against unistalled library and user
should be advised to use libool anyway.

refs #428

Location:
trunk/build_support
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build_support/Makefile.am

    r1696 r1697  
    33## $Id$
    44
    5 # Copyright (C) 2008 Peter Johansson
     5# Copyright (C) 2008 2009 Peter Johansson
    66#
    77# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    6060  -e 's|@YAT_LIBNAME[@]|$(YAT_LIBNAME)|g' \
    6161  -e 's|@gsl_version[@]|$(gsl_version)|g' \
     62  -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
     63  -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
    6264  -e 's|@boost_version[@]|$(boost_version)|g'
    6365
     
    7981  @mv $@.tmp $@
    8082  @$(ECHO) creating $@
     83
     84install-exec-hook:
     85  $(SED) -i 's|installed=no|installed=yes|g' \
     86  $(DESTDIR)/$(bindir)/yat-config
  • trunk/build_support/yat-config.in

    r1689 r1697  
    11# $Id$
    22
    3 # Copyright (C) 2008 Peter Johansson
     3# Copyright (C) 2008 2009 Peter Johansson
    44#
    55# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2323libdir="@libdir@"
    2424includedir="@includedir@"
     25
     26installed=no
    2527
    2628CXX="@CXX@"
     
    3537
    3638LA_FILE="$libdir/lib@YAT_LIBNAME@.la"
     39if test x$installed = xno; then
     40  LA_FILE="@abs_top_builddir@/lib@YAT_LIBNAME@.la"
     41fi
    3742
    3843usage()
     
    100105    ;;
    101106    --cppflags)
    102     flags="$flags -I$includedir $EXTRA_CPPFLAGS $CPPFLAGS"
     107    if test $installed = yes; then
     108       flags="$flags -I$includedir"
     109    else
     110       # second part is for VPATH builds. No need to separate the
     111       # cases because redundancy will be removed by unique filtering
     112       # below.
     113       flags="$flags -I@abs_top_srcdir@ -I@abs_top_builddir@"
     114    fi
     115    flags="$flags $EXTRA_CPPFLAGS $CPPFLAGS"
    103116    ;;
    104117    --cxxflags)
Note: See TracChangeset for help on using the changeset viewer.