Changeset 3070


Ignore:
Timestamp:
Aug 27, 2013, 8:58:21 AM (8 years ago)
Author:
Peter
Message:

improve docs and clean up output files. closes #759

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_lt_link_ifelse.m4

    r3069 r3070  
    7878
    7979
    80 #
     80# YAT_LT_LINK_LA_IFELSE(input, [action-if-true], [action-if-false])
     81# -----------------------------------------------------------------
     82# Try to create a libtool archive in two steps. First, run the
     83# compiler on input similar to AC_COMPILE_IFELSE, but input is not
     84# expected to have a main() function. If successful, try to create a
     85# libconftest.la with created object as input and linking with
     86# $LIBS. If both steps are successful, execute shell code
     87# action-if-true, otherwise execute action-if-false.
    8188AC_DEFUN([YAT_LT_LINK_LA_IFELSE],
    8289[
    8390YAT_USE_LIBTOOL_PUSH
    84 #ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
    85 cat > conftest.cpp << EOF
     91cat > conftest.$ac_ext << EOF
    8692$1
    8793EOF
    8894
    89 # FIXME we should log program etc when failed similar to AC_LINK_IFELSE
     95m4_pushdef([ACTION_IF_FALSE],
     96           [_YAT_MSG_LOG_CONFTEST
     97            $3])
    9098YAT_RUN_LOG([./libtool --mode=compile --tag=_YAT_USE_LIBTOOL_TAG \
    91        $CXX $CPPFLAGS $CXXFLAGS -c -o conftest.lo conftest.cpp],
     99       $CXX $CPPFLAGS $CXXFLAGS -c -o conftest.lo conftest.$ac_ext],
    92100  [YAT_RUN_LOG([./libtool --mode=link --tag=_YAT_USE_LIBTOOL_TAG \
    93101                $CXX $CXXFLAGS $LDFLAGS -o libconftest.la \
    94102                -rpath `pwd` conftest.lo $LIBS],
    95                [$2], [$3])],
    96   [$3])
     103               [$2], [ACTION_IF_FALSE])],
     104  [ACTION_IF_FALSE])
    97105
     106./libtool --mode=clean rm -f conftest.lo libconftest.la
     107rm -f conftest.$ac_ext
     108m4_popdef([ACTION_IF_FALSE])
    98109YAT_USE_LIBTOOL_POP
    99110]) # YAT_LT_LINK_STATIC_IFELSE
    100111
     112# _YAT_MSG_LOG_CONFTEST
     113# ---------------------
     114# log source file conftest.$ac_ext
     115m4_define([_YAT_MSG_LOG_CONFTEST],
     116[AS_ECHO(["$as_me: failed code was:"]) >&AS_MESSAGE_LOG_FD
     117sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
     118])
    101119
    102120# _YAT_USE_LIBTOOL_TAG
  • trunk/test/Makefile.am

    r3069 r3070  
    152152  $(top_builddir)/build_support/yat-config
    153153test/yat_lt_link_la_ifelse_test.log: $(shell_test_deps) \
    154   $(top_srcdir)/m4/yat_lt_link_ifelse.m4
     154  $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
     155  $(top_srcdir)/m4/yat_common.m4
    155156test/yat_m4_test.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
    156157  $(top_builddir)/build_support/yat-config
Note: See TracChangeset for help on using the changeset viewer.