Add support for POSIX regular expressions.
[bpt/guile.git] / libguile / Makefile.am
index 978095a..ffa1223 100644 (file)
@@ -8,38 +8,57 @@ AUTOMAKE_OPTIONS = foreign
 INCLUDES = -I.. -I$(srcdir)/..
 
 lib_LTLIBRARIES = libguile.la
-libguile_la_SOURCES = alist.c append.c appinit.c arbiters.c async.c \
-    boolean.c chars.c continuations.c dynl.c dynwind.c eq.c \
-    error.c eval.c extchrs.c feature.c filesys.c fports.c gc.c \
-    gdbint.c genio.c gsubr.c hash.c hashtab.c init.c ioext.c \
-    kw.c list.c load.c mallocs.c markers.c mbstrings.c net_db.c \
-    numbers.c objprop.c \
-    options.c pairs.c ports.c posix.c print.c procprop.c procs.c ramap.c \
-    read.c root.c scmsigs.c sequences.c simpos.c smob.c socket.c \
-    stackchk.c stime.c strings.c strop.c strorder.c \
-    strports.c struct.c symbols.c tag.c throw.c unif.c variable.c \
-    vectors.c version.c vports.c weaks.c _scm.h
-EXTRA_libguile_la_SOURCES = backtrace.c stacks.c debug.c srcprop.c \
-    strerror.c inet_aton.c putenv.c
+bin_PROGRAMS = guile
+
+guile_SOURCES = guile.c
+guile_LDADD = libguile.la ${THREAD_LIBS}
+
+libguile_la_SOURCES = \
+    alist.c append.c appinit.c arbiters.c async.c boolean.c chars.c \
+    continuations.c dynl.c dynwind.c eq.c error.c eval.c extchrs.c \
+    feature.c filesys.c fports.c gc.c gdbint.c genio.c gh_data.c gh_eval.c \
+    gh_funcs.c gh_init.c gh_io.c gh_list.c gh_predicates.c gsubr.c hash.c \
+    hashtab.c init.c ioext.c kw.c list.c load.c mallocs.c markers.c \
+    mbstrings.c net_db.c numbers.c objprop.c options.c pairs.c ports.c \
+    posix.c print.c procprop.c procs.c ramap.c read.c root.c scmsigs.c \
+    script.c sequences.c simpos.c smob.c socket.c stackchk.c stime.c \
+    strings.c strop.c strorder.c strports.c struct.c symbols.c tag.c \
+    throw.c unif.c variable.c vectors.c version.c vports.c weaks.c
+
+EXTRA_libguile_la_SOURCES = _scm.h \
+    backtrace.c stacks.c debug.c srcprop.c \
+    strerror.c inet_aton.c putenv.c \
+    threads.c alloca.c \
+    regex-posix.c
+
+## This is kind of nasty... there are ".c" files that we don't want to
+## compile, since they are #included in threads.c.  So instead we list
+## them here.  Perhaps we can deal with them normally once the merge
+## seems to be working.
+noinst_HEADERS = coop-threads.c coop-threads.h coop.c
+
 libguile_la_DEPENDENCIES = @LIBLOBJS@
 libguile_la_LIBADD = @LIBLOBJS@
-libguile_la_LDFLAGS = -version-info 0:0 -rpath $(libdir)
+libguile_la_LDFLAGS = -version-info 1:1 -rpath $(libdir)
 
 include_HEADERS = libguile.h
 
+# These are headers visible as <guile/mumble.h> 
+pkginclude_HEADERS = gh.h
+
 # These are headers visible as <libguile/mumble.h>.
-modincludedir = $(includedir)/@module@
+modincludedir = $(includedir)/libguile
 modinclude_HEADERS = __scm.h alist.h append.h arbiters.h async.h \
     backtrace.h boolean.h chars.h continuations.h debug.h dynl.h dynwind.h \
     eq.h error.h eval.h extchrs.h feature.h filesys.h fports.h gc.h \
     gdb_interface.h gdbint.h genio.h gsubr.h hash.h hashtab.h init.h \
     ioext.h kw.h list.h load.h mallocs.h markers.h mbstrings.h net_db.h \
-    numbers.h objprop.h options.h pairs.h ports.h posix.h print.h \
-    procprop.h procs.h ramap.h read.h root.h scmhob.h scmsigs.h \
+    numbers.h objprop.h options.h pairs.h ports.h posix.h regex-posix.h print.h \
+    procprop.h procs.h ramap.h read.h root.h scmhob.h scmsigs.h script.h \
     sequences.h simpos.h smob.h socket.h srcprop.h stackchk.h stacks.h \
     stime.h strings.h strop.h strorder.h strports.h struct.h symbols.h \
     tag.h tags.h throw.h unif.h variable.h vectors.h version.h vports.h \
-    weaks.h snarf.h
+    weaks.h snarf.h threads.h coop-defs.h
 
 ## This file is generated at configure time.  That is why it is DATA
 ## and not a header -- headers are included in the distribution.
@@ -47,19 +66,34 @@ modinclude_DATA = scmconfig.h
 
 bin_SCRIPTS = guile-snarf
 
-EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
-    dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
-    PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_symbols.in \
-    cpp_sig_symbols.in cpp_cnvt.awk
+THREAD_LIBS = @THREAD_LIBS@
+check_ldadd = libguile.la ${THREAD_LIBS}
+check_PROGRAMS = gh_test_c gh_test_repl
+gh_test_c_SOURCES = gh_test_c.c
+gh_test_c_LDADD = ${check_ldadd}
+gh_test_repl_SOURCES = gh_test_repl.c
+gh_test_repl_LDADD = ${check_ldadd}
+
+check-local:
+       echo '(+ 1 2 3)' | ./gh_test_c; echo
+       echo '(+ 1 2 3)' | ./gh_test_repl; echo
+
+EXTRA_DIST = ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
+    dynl-vms.c DYNAMIC-LINKING cpp_signal.c cpp_errno.c cpp_err_symbols.in \
+    cpp_sig_symbols.in cpp_cnvt.awk \
+    coop-threads.h.cygnus coop-threads.c.cygnus mit-pthreads.h mit-pthreads.c \
+    fsu-pthreads.h
 
 ## FIXME: shouldn't directly generate file; instead generate temp file
 ## and "mv".  Consider using timestamp file as well, to avoid
 ## unnecessary rebuilds.
 libpath.h: Makefile
-       echo '/* generated by Makefile */' > libpath.h
-       echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.h
-       echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"' >> libpath.h
-       echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.h
+       rm -f libpath.tmp
+       echo '/* generated by Makefile */' > libpath.tmp
+       echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
+       echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"' >>libpath.tmp
+       echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
+       mv libpath.tmp libpath.h
 
 SUFFIXES = .x
 .c.x:
@@ -70,11 +104,13 @@ MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 
 cpp_err_symbols.c: cpp_err_symbols.in
        $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
-               cpp_err_symbols.c
+               cpp_err_symbols.tmp
+       mv cpp_err_symbols.tmp cpp_err_symbols.c
 
 cpp_sig_symbols.c: cpp_sig_symbols.in
        $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
-               cpp_sig_symbols.c
+               cpp_sig_symbols.tmp
+       mv cpp_sig_symbols.tmp cpp_sig_symbols.c
 
 ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
 ## macros defined on this platform.