Changeset 3040


Ignore:
Timestamp:
Jun 8, 2013, 2:03:34 PM (8 years ago)
Author:
Peter
Message:

create build rule for test shared lib. closes #761

Location:
trunk
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r3018 r3040  
    6565
    6666clean-local:
    67   rm -rf doc/$(DX_HTML_OUTPUT) test/yathello test/testSubDir
     67  rm -rf doc/$(DX_HTML_OUTPUT) test/yathello test/testSubDir test/lib
    6868
    6969installcheck-local: $(INSTALL_CHECK_TARGETS)
  • trunk/test/Makefile.am

    r3038 r3040  
    287287endif
    288288
    289 CLEANFILES += test/lib/.dirstamp
    290 
    291289test/lib/.dirstamp:
    292290  @$(MKDIR_P) test/lib
     
    294292
    295293check_DATA += test/lib/libmy-static.a
    296 CLEANFILES += test/lib/libmy-static.a
    297294
    298295test/lib/libmy-static.a: test/lib/.dirstamp test/gen_libmy_static.sh \
     
    300297  $(AM_V_GEN)
    301298  $(AM_V_at)$(SHELL) test/gen_libmy_static.sh $(yat_dev_null)
     299
     300check_DATA += test/lib/libmy-shared.la
     301
     302test/lib/libmy-shared.la: test/lib/.dirstamp test/gen_libmy_shared.sh \
     303test/defs.sh
     304  $(AM_V_GEN)
     305  $(AM_V_at)$(SHELL) test/gen_libmy_shared.sh $(yat_dev_null)
  • trunk/test/gen_libmy_shared.sh

    r3039 r3040  
    11# $Id$
    22
    3 # Create a static library: test/lib/libmy-static.a
     3# Create a static library: test/lib/libmy-shared.la
    44
    55# Copyright (C) 2013 Peter Johansson
     
    2828}
    2929
    30 required="autoconf automake static"
     30required="autoconf automake libtool shared"
    3131check_requirements > stdout 2> stderr
    3232
     
    3535if test x$req_failed = xyes; then
    3636    $mkdir_p $abs_top_builddir/test/lib
    37     : > $abs_top_builddir/test/lib/libmy-static.a
     37    : > $abs_top_builddir/test/lib/libmy-shared.la
    3838    exit 0
    3939fi
     
    4545cat > configure.ac <<EOF
    4646AC_INIT([foo], [1])
     47AC_CONFIG_MACRO_DIR([m4])
    4748AM_INIT_AUTOMAKE([foreign])
    4849AC_PROG_CXX
    49 AC_PROG_RANLIB
     50LT_INIT([disable-static])
    5051AC_CONFIG_FILES([Makefile])
    5152AC_OUTPUT
     
    5354
    5455cat > Makefile.am <<EOF
    55 lib_LIBRARIES = libmy-static.a
    56 libmy_static_a_SOURCES = foo.cc
     56ACLOCAL_AMFLAGS = -I m4
     57lib_LTLIBRARIES = libmy-shared.la
     58libmy_shared_la_SOURCES = foo.cc
    5759EOF
    5860
    5961cat > foo.cc <<EOF
    60 int foo_static(void) { return 0; }
     62int foo_shared(void) { return 0; }
    6163EOF
    6264
Note: See TracChangeset for help on using the changeset viewer.