diff --git a/ChangeLog b/ChangeLog index 72910264..d666cd34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 1998-11-19 Alexandre Oliva + * mdemo/Makefile.am (hell_debug_LDFLAGS): -dlpreopen -> -dlopen + (hell_LDFLAGS): added -export-dynamic and -dlopen + (SUBDIRS, INCLUDES): added modules directory + (foo1.c, foo2.c, foo.h, libfoo1.sym, libfoo2.sym): moved to modules + * Makefile.am: ditto + * tests/mdemo-exec.test, tests/mdemo-inst.test: libraries moved + * mdemo/modules/Makefile.am: new file + + * */Makefile.am (AUTOMAKE_OPTIONS): added no-dependencies + * ltmain.in: missing `test' between `&&' and `"$module"' * ltconfig.in (echo_test_string): the whole ltconfig script was diff --git a/Makefile.am b/Makefile.am index 91a03d06..dc46d619 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,9 +24,9 @@ demo_distfiles = demo/Makefile.in demo/Makefile.am demo/README \ mdemo_distfiles = mdemo/Makefile.in mdemo/Makefile.am mdemo/README \ mdemo/acinclude.m4 mdemo/aclocal.m4 \ mdemo/configure mdemo/configure.in \ - mdemo/foo.h mdemo/foo1.c mdemo/foo2.c \ - mdemo/libfoo1.sym mdemo/libfoo2.sym \ - mdemo/main.c mdemo/ltdl.h mdemo/ltdl.c mdemo/ltdls.c + mdemo/main.c mdemo/modules/Makefile.in mdemo/modules/Makefile.am \ + mdemo/modules/foo.h mdemo/modules/foo1.c mdemo/modules/foo2.c \ + mdemo/modules/libfoo1.sym mdemo/modules/libfoo2.sym # Files in the libltdl subdirectory that go in the distribution. libltdl_distfiles = libltdl/Makefile.in libltdl/Makefile.am libltdl/README \ diff --git a/demo/Makefile.am b/demo/Makefile.am index a9685212..bccf547e 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -3,7 +3,7 @@ # NOTE: Don't forget that in the libtool distribution, files in this # directory are distributed by the demo_distfiles variable in the top # level Makefile. -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = no-dependencies foreign EXTRA_DIST = $(TESTS) acinclude.m4 diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index ccbb2b4d..c849bcf1 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -3,7 +3,7 @@ # NOTE: Don't forget that in the libtool distribution, files in this # directory are distributed by the demo_distfiles variable in the top # level Makefile. -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = no-dependencies foreign CFLAGS = -module diff --git a/mdemo/.cvsignore b/mdemo/.cvsignore index 3b25c3fe..b005d40e 100644 --- a/mdemo/.cvsignore +++ b/mdemo/.cvsignore @@ -7,7 +7,5 @@ configure config.* conftest* libtool -*.lo -*.la hell hell.debug diff --git a/mdemo/Makefile.am b/mdemo/Makefile.am index 4bd49b91..f6c2ef47 100644 --- a/mdemo/Makefile.am +++ b/mdemo/Makefile.am @@ -3,30 +3,26 @@ # NOTE: Don't forget that in the libtool distribution, files in this # directory are distributed by the demo_distfiles variable in the top # level Makefile. -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = no-dependencies foreign -INCLUDES = -I$(srcdir)/../libltdl +SUBDIRS = modules + +INCLUDES = -I$(srcdir)/../libltdl -I$(srcdir)/modules EXTRA_DIST = acinclude.m4 -lib_LTLIBRARIES = libfoo1.la libfoo2.la -libfoo1_la_SOURCES = foo1.c -libfoo1_la_LDFLAGS = -export-symbols $(srcdir)/libfoo1.sym -lm -module - -libfoo2_la_SOURCES = foo2.c -libfoo2_la_LDFLAGS = -export-symbols $(srcdir)/libfoo2.sym -lm -module - -include_HEADERS = foo.h - bin_PROGRAMS = hell hell.debug # Create a version of hell that does dlopen. hell_SOURCES = main.c -hell_LDADD = ../libltdl/libltdl.la -lm -hell_DEPENDENCIES = libfoo1.la libfoo2.la +hell_LDADD = ../libltdl/libltdl.la \ + -lm # We won't need this when libltdl takes care of dependencies +hell_LDFLAGS = -export-dynamic -dlopen modules/libfoo1.la -dlopen modules/libfoo2.la +hell_DEPENDENCIES = modules/libfoo1.la modules/libfoo2.la # Create an easier-to-debug version of hell. hell_debug_SOURCES = main.c -hell_debug_LDADD = ../libltdl/libltdl.la libfoo1.la libfoo2.la +hell_debug_LDADD = ../libltdl/libltdl.la hell_debug_LDFLAGS = -static -export-dynamic \ - -dlpreopen libfoo1.la -dlpreopen libfoo2.la + -dlpreopen modules/libfoo1.la -dlpreopen modules/libfoo2.la +# Shouldn't this be the same as -dlopen, since we're linking statically? diff --git a/mdemo/configure.in b/mdemo/configure.in index eb803195..7aa88604 100644 --- a/mdemo/configure.in +++ b/mdemo/configure.in @@ -7,4 +7,4 @@ AC_EXEEXT AM_PROG_LIBTOOL dnl Output the makefile -AC_OUTPUT(Makefile) +AC_OUTPUT(Makefile modules/Makefile) diff --git a/mdemo/modules/.cvsignore b/mdemo/modules/.cvsignore new file mode 100644 index 00000000..09980ae6 --- /dev/null +++ b/mdemo/modules/.cvsignore @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +Makefile.in +*.lo +*.la diff --git a/mdemo/modules/Makefile.am b/mdemo/modules/Makefile.am new file mode 100644 index 00000000..22cff523 --- /dev/null +++ b/mdemo/modules/Makefile.am @@ -0,0 +1,20 @@ +# A brief demonstration of using Automake with Libtool. -*-Makefile-*- +# +# NOTE: Don't forget that in the libtool distribution, files in this +# directory are distributed by the demo_distfiles variable in the top +# level Makefile. +AUTOMAKE_OPTIONS = no-dependencies foreign + +CFLAGS = @CFLAGS@ -module + +INCLUDES = -I$(srcdir)/../../libltdl + +lib_LTLIBRARIES = libfoo1.la libfoo2.la + +libfoo1_la_SOURCES = foo1.c +libfoo1_la_LDFLAGS = -export-symbols $(srcdir)/libfoo1.sym -lm -module + +libfoo2_la_SOURCES = foo2.c +libfoo2_la_LDFLAGS = -export-symbols $(srcdir)/libfoo2.sym -lm -module + +include_HEADERS = foo.h diff --git a/mdemo/foo.h b/mdemo/modules/foo.h similarity index 100% rename from mdemo/foo.h rename to mdemo/modules/foo.h diff --git a/mdemo/foo1.c b/mdemo/modules/foo1.c similarity index 100% rename from mdemo/foo1.c rename to mdemo/modules/foo1.c diff --git a/mdemo/foo2.c b/mdemo/modules/foo2.c similarity index 100% rename from mdemo/foo2.c rename to mdemo/modules/foo2.c diff --git a/mdemo/libfoo1.sym b/mdemo/modules/libfoo1.sym similarity index 100% rename from mdemo/libfoo1.sym rename to mdemo/modules/libfoo1.sym diff --git a/mdemo/libfoo2.sym b/mdemo/modules/libfoo2.sym similarity index 100% rename from mdemo/libfoo2.sym rename to mdemo/modules/libfoo2.sym diff --git a/tests/mdemo-exec.test b/tests/mdemo-exec.test index 3a231a51..0aa99f19 100755 --- a/tests/mdemo-exec.test +++ b/tests/mdemo-exec.test @@ -19,19 +19,19 @@ fi # Check to see if the programs really run. echo "Executing uninstalled programs in ../mdemo" -old_library1=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/libfoo1.la` -old_library2=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/libfoo2.la` -dlname1=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/libfoo1.la` -dlname2=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/libfoo2.la` +old_library1=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/modules/libfoo1.la` +old_library2=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/modules/libfoo2.la` +dlname1=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/modules/libfoo1.la` +dlname2=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/modules/libfoo2.la` status=0 -if ../mdemo/hell.debug .libs/$old_library1 .libs/$old_library2; then : +if ../mdemo/hell.debug modules/.libs/$old_library1 modules/.libs/$old_library2; then : else echo "$0: cannot execute ../mdemo/hell.debug" 1>&2 status=1 fi -if ../mdemo/hell ../mdemo/.libs/$dlname1 ../mdemo/.libs/$dlname2; then : +if ../mdemo/hell ../mdemo/modules/.libs/$dlname1 ../mdemo/modules/.libs/$dlname2; then : else echo "$0: cannot execute ../mdemo/hell" 1>&2 status=1 diff --git a/tests/mdemo-inst.test b/tests/mdemo-inst.test index b8bacd63..2c0fc944 100755 --- a/tests/mdemo-inst.test +++ b/tests/mdemo-inst.test @@ -35,13 +35,13 @@ $make install || exit 1 echo "= Executing installed programs" -old_library1=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/libfoo1.la` -old_library2=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/libfoo2.la` -dlname1=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/libfoo1.la` -dlname2=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/libfoo2.la` +old_library1=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/modules/libfoo1.la` +old_library2=`sed -n -e "s/^old_library='\(.*\)'/\1/p" ../mdemo/modules/libfoo2.la` +dlname1=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/modules/libfoo1.la` +dlname2=`sed -n -e "s/^dlname='\(.*\)'/\1/p" ../mdemo/modules/libfoo2.la` status=0 -if $prefix/bin/hell.debug .libs/$old_library1 .libs/$old_library2; then : +if $prefix/bin/hell.debug modules/.libs/$old_library1 modules/.libs/$old_library2; then : else echo "$0: cannot execute $prefix/bin/hell.debug" 1>&2 status=1