1998-11-19 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * 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
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 \
# 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
# 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
config.*
conftest*
libtool
-*.lo
-*.la
hell
hell.debug
# 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
-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
+INCLUDES = -I$(srcdir)/../libltdl -I$(srcdir)/modules
-libfoo2_la_SOURCES = foo2.c
-libfoo2_la_LDFLAGS = -export-symbols $(srcdir)/libfoo2.sym -lm -module
-
-include_HEADERS = foo.h
+EXTRA_DIST = acinclude.m4
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?
AM_PROG_LIBTOOL
dnl Output the makefile
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile modules/Makefile)
--- /dev/null
+.deps
+.libs
+Makefile
+Makefile.in
+*.lo
+*.la
--- /dev/null
+# 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
# 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
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