* 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
This commit is contained in:
Alexandre Oliva 1998-11-19 22:53:40 +00:00 committed by Alexandre Oliva
parent 39eaa038a1
commit d4326213cb
16 changed files with 64 additions and 34 deletions

View File

@ -1,5 +1,15 @@
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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -7,7 +7,5 @@ configure
config.*
conftest*
libtool
*.lo
*.la
hell
hell.debug

View File

@ -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?

View File

@ -7,4 +7,4 @@ AC_EXEEXT
AM_PROG_LIBTOOL
dnl Output the makefile
AC_OUTPUT(Makefile)
AC_OUTPUT(Makefile modules/Makefile)

6
mdemo/modules/.cvsignore Normal file
View File

@ -0,0 +1,6 @@
.deps
.libs
Makefile
Makefile.in
*.lo
*.la

20
mdemo/modules/Makefile.am Normal file
View File

@ -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

View File

@ -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

View File

@ -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