* Makefile.in (ancillary): List aclocal.m4, for 'make dist'.
authorJim Blandy <jimb@red-bean.com>
Wed, 4 Sep 1996 06:16:37 +0000 (06:16 +0000)
committerJim Blandy <jimb@red-bean.com>
Wed, 4 Sep 1996 06:16:37 +0000 (06:16 +0000)
* Makefile.in (ALL_CFLAGS): Don't mention CFLAGS here; it's
implicit in the .c.o rule.
(.c.x): Don't mention ALL_CFLAGS here; its value is included in
$(CC) already.

Put the library path in a header file, instead of passing it on
the command line in every compilation.
* Makefile.in (libpath.h): New target.
(feature.o): Depend on libpath.h.
(clean): Delete libpath.h.
(ALL_CFLAGS): Don't use -DLIBRARY_PATH here.  Instead ...
* feature.c: ... #include "libpath.h" here.
* .cvsignore: Ignore libpath.h.

Don't install the unwashed masses of Guile header files in the
main #include path; put most of them in a subdirectory called
'libguile'.  This avoids naming conflicts between Guile header
files and system header files (of which there were a few).
* Makefile.in (pkgincludedir): Deleted.
(innerincludedir): New variable; this and $(includedir) are enough.
(INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
(installed_h_files): Divide this up.  Now this variable lists
those header files which should go into $(includedir) (i.e. appear
directly in the #include path), and ...
(inner_h_files): ... this new variable says which files appear in
a subdirectory, and are referred to as <libguile/mumble.h>.
(h_files): List them both.
(install): Create innerincludedir, not pkgincludedir.  Put
the installed_h_files and inner_h_files in their proper places.
(uninstall): Corresponding changes.
* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: Find __scm.h in its new location.
* __scm.h: Find scmconfig.h and tags.h in their new locations
(they're both "inner" files).

libguile/Makefile.in

index 26ad9b3..c1da76e 100644 (file)
@@ -37,9 +37,9 @@ exec_prefix = @exec_prefix@
 # Directory in which to install init files &c
 libdir = @libdir@
 
-# Directory for installed #include files
+# Directory for installed #include files for all packages
 includedir = @includedir@
-pkgincludedir = $(includedir)/guile$(VERSION)
+innerincludedir = $(includedir)/libguile
 
 # Directory to install `guile' in.
 bindir = @bindir@
@@ -56,12 +56,15 @@ ETAGS = etags
 CTAGS = ctags -tw
 
 # CC
-X11_INCLUDES =         @XINCLUDES@
-XFLAGS = @X_CFLAGS@
-CFLAGS = @CFLAGS@ 
-INCLUDE_CFLAGS = -I. -I$(srcdir) 
-ALL_CFLAGS = $(CFLAGS) $(X_CFLAGS) $(INCLUDE_CFLAGS) $(X11_INCLUDES) -DLIBRARY_PATH=\"$(pkgdatadir)/\" @DEFS@
-CC = @CC@ $(ALL_CFLAGS) -Wall
+X11_INCLUDES=@XINCLUDES@
+XFLAGS=@X_CFLAGS@
+CFLAGS=@CFLAGS@ 
+# Check for headers in $(srcdir)/.., so that #include
+# <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
+# building.
+INCLUDE_CFLAGS=-I. -I$(srcdir)/.. -I$(srcdir)
+ALL_CFLAGS=$(X_CFLAGS) $(INCLUDE_CFLAGS) $(X11_INCLUDES) @DEFS@
+CC=@CC@ $(ALL_CFLAGS) -Wall
 
 # CC used as a front end for ld
 LDFLAGS = @LDFLAGS@
@@ -143,9 +146,14 @@ libobjs=   alist.o \
                $(extras)
 
 
+# These are headers used only by the internal guile sources.
 uninstalled_h_files= _scm.h
 
-installed_h_files= __scm.h \
+# These are headers visible as <mumble.h>.
+installed_h_files = libguile.h
+
+# These are headers visible as <libguile/mumble.h>.
+inner_h_files= __scm.h \
                alist.h \
                append.h \
                arbiters.h \
@@ -172,7 +180,6 @@ installed_h_files= __scm.h \
                init.h \
                ioext.h \
                kw.h \
-               libguile.h \
                list.h \
                load.h \
                mallocs.h \
@@ -217,7 +224,7 @@ installed_h_files= __scm.h \
                vports.h \
                weaks.h
 
-h_files=$(uninstalled_h_files) $(installed_h_files)
+h_files=$(uninstalled_h_files) $(installed_h_files) $(inner_h_files)
 
 c_files=       alist.c \
                append.c \
@@ -365,6 +372,7 @@ ancillary = gscm.c \
                ChangeLog.scm \
                Makefile.in \
                acconfig.h \
+               aclocal.m4 \
                configure \
                configure.in \
                scmconfig.h.in \
@@ -374,7 +382,6 @@ ancillary = gscm.c \
 c_sources = $(c_files) $(h_files)
 manifest = $(ancillary) $(c_sources)
 
-
 .SUFFIXES:
 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo .scm .x
 
@@ -385,7 +392,7 @@ manifest = $(ancillary) $(c_sources)
        else \
          fake_scmconfig=0; \
        fi; \
-       $(CC) $(ALL_CFLAGS) -I. -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \
+       $(CC) -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \
        if test $$fake_scmconfig -eq 1 ; then \
          rm scmconfig.h; \
        else : ; \
@@ -394,6 +401,10 @@ manifest = $(ancillary) $(c_sources)
 .PHONY: all
 all: libguile.a
 
+libpath.h: Makefile
+       echo '/* generated by Makefile */' > libpath.h
+       echo '#define LIBRARY_PATH "$(pkgdatadir)/"' >> libpath.h
+
 # The `dist' target in the top-level Makefile uses this `dist-dir'
 # target to select the appropriate files for distribution from the
 # directory containing this Makefile.
@@ -422,21 +433,22 @@ libguile.a: $(libobjs)
 install: all
        test -d $(prefix) || mkdir $(prefix)
        test -d $(libdir) || mkdir $(libdir)
-       test -d $(includedir) || mkdir $(includedir)
-       test -d $(pkgincludedir) || mkdir $(pkgincludedir)
        $(INSTALL_DATA) libguile.a $(libdir)/libguile$(VERSION).a
-       $(INSTALL_DATA) scmconfig.h $(pkgincludedir)
-       for h in $(h_files); do \
-         $(INSTALL_DATA) $(srcdir)/$$h $(pkgincludedir); \
+       ln -f -s libguile$(VERSION).a $(libdir)/libguile.a
+       test -d $(includedir)      || mkdir $(includedir)
+       test -d $(innerincludedir) || mkdir $(innerincludedir)
+       for h in $(installed_h_files); do \
+         $(INSTALL_DATA) $(srcdir)/$$h $(includedir); \
+       done
+       for h in scmconfig.h $(inner_h_files); do \
+         $(INSTALL_DATA) $(srcdir)/$$h $(innerincludedir); \
        done
 
 uninstall:
-       -for h in $(h_files); do \
-         rm -f $(pkgincludedir)/$$h; \
-       done
-       rm -f $(pkgincludedir)/scmconfig.h
-       -rmdir $(pkgincludedir)
        -rm $(libdir)/libguile$(VERSION).a
+       -rm $(libdir)/libguile.a
+       -rm -rf $(guileincludedir)
+       -rm $(includedir)/guile
 
 
 TAGS:
@@ -449,6 +461,7 @@ clean:
        -rm -f libguile.a
        -rm -f $(libobjs)
        -rm -f $(gen_c_files)
+       -rm -f libpath.h
 
 distclean: clean
        -rm -f config.cache
@@ -627,7 +640,7 @@ feature.o: feature.c _scm.h libguile.h __scm.h tags.h smob.h params.h \
  posix.h print.h procprop.h procs.h ramap.h read.h root.h scmsigs.h \
  sequences.h simpos.h socket.h srcprop.h stackchk.h stime.h strings.h \
  strop.h strorder.h strports.h struct.h tag.h throw.h unif.h \
- variable.h vectors.h version.h vports.h weaks.h feature.x
+ variable.h vectors.h version.h vports.h weaks.h libpath.h feature.x
 files.o: files.c _scm.h libguile.h __scm.h tags.h smob.h params.h \
  alist.h append.h arbiters.h async.h boolean.h chars.h continuations.h \
  debug.h options.h dynwind.h eq.h error.h pairs.h eval.h extchrs.h \