# HG changeset patch # User jwe # Date 758942997 0 # Node ID 3916fadea706d389fa8e22ab8f83f0b9358b25f7 # Parent 9bccd5a92dc53caca038b18d8701343ecd9009b9 [project @ 1994-01-19 01:28:46 by jwe] diff --git a/Makeconf.in b/Makeconf.in --- a/Makeconf.in +++ b/Makeconf.in @@ -112,7 +112,7 @@ datadir = $(prefix)/lib/octave # Where to put installed include files. -includedir = $(prefix)/include +includedir = $(prefix)/include/octave # The type of computer we are running on. target_host_type = @target_host_type@ @@ -131,3 +131,31 @@ .cc.o: $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $< + +# Here is a rule for generating dependencies for .cc files: + +%.d: %.cc + rm -f $@ + -if test "$(srcdir)" = "." ; then \ + $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \ + sed -e 's/$*\.o/& $@/g' > $@.tmp && \ + mv $@.tmp $@ ; \ + else \ + $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \ + sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp && \ + mv $@.tmp $@ ; \ + fi + +# And one for .c files.too: + +%.d: %.c + rm -f $@ + -if test "$(srcdir)" = "." ; then \ + $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \ + sed -e 's/$*\.o/& $@/g' > $@.tmp && \ + mv $@.tmp $@ ; \ + else \ + $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \ + sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp && \ + mv $@.tmp $@ ; \ + fi diff --git a/liboctave/Makefile.in b/liboctave/Makefile.in --- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -19,7 +19,9 @@ QLD.h QP.h QPSOL.h Quad.h Range.h mx-kludge.h lo-error.h \ f77-uscore.h sun-utils.h -SOURCES = Array.cc Bounds.cc ColVector.cc CollocWt.cc DAE.cc \ +TEMPLATE_SRC = Array.cc + +SOURCES = $(TEMPLATE_SRC) Bounds.cc ColVector.cc CollocWt.cc DAE.cc \ DAEFunc.cc DiagMatrix.cc FEGrid.cc FSQP.cc LinConst.cc LP.cc \ LPsolve.cc Matrix-ext.cc Matrix.cc NLConst.cc NLEqn.cc \ NLFunc.cc NPSOL.cc Objective.cc ODE.cc ODEFunc.cc QLD.cc \ @@ -53,7 +55,7 @@ $(RANLIB) $(libdir)/liboctave.a if test -d $(includedir) ; then true ; \ else $(TOPDIR)/mkpath $(includedir) ; fi - for f in $(INCLUDES) ; do \ + for f in $(INCLUDES) $(TEMPLATE_SRC) ; do \ rm -f $(includedir)/$$f ; \ $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/$$f ; \ done