Update of /cvsroot/pure-data/externals/iem/iemmatrix/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13709
Modified Files: configure.ac Makefile.in Log Message: automatic dependency generation on-the-fly sources generation (iemmatrix.c mtx_*.c)
Index: Makefile.in =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.in 20 May 2005 12:29:05 -0000 1.3 --- Makefile.in 15 Sep 2005 12:02:54 -0000 1.4 *************** *** 9,12 **** --- 9,13 ---- DEFS = @DFLAGS@ IFLAGS = -I. @INCLUDES@ $(INCLUDES) + MAKEDEP_FLAGS = @MAKEDEP_FLAGS@
CC = @CC@ *************** *** 25,33 ****
LIBS = @LIBS@ - include Make.source - TARGETS = $(SOURCES:.c=.o)
all: $(LIBNAME) cp $(LIBNAME).$(EXT) ..
--- 26,35 ----
LIBS = @LIBS@
+ SOURCES=$(sort $(filter %.c, $(wildcard mtx_*.c))) iemmatrix.c + TARGETS = $(SOURCES:.c=.o)
all: $(LIBNAME) + echo targets $(TARGETS) cp $(LIBNAME).$(EXT) ..
*************** *** 36,49 **** $(STRIP) @STRIPFLAGS@ $(LIBNAME).$(EXT)
clean: -rm -f *.$(EXT) *.o
cleaner: clean ! -rm -f *~ _* config.*
cleanest: cleaner ! -rm -f Makefile ../*.$(EXT) Make.source
! distclean: cleanest newmakefile
install: install-bin install-doc --- 38,60 ---- $(STRIP) @STRIPFLAGS@ $(LIBNAME).$(EXT)
+ ## dependencies: as proposed by the GNU-make documentation + ## see http://www.gnu.org/software/make/manual/html_node/make_47.html#SEC51 + -include $(SOURCES:.c=.d) + %.d: %.c + @set -e; rm -f $@; \ + $(CXX) $(MAKEDEP_FLAGS) $(CFLAGS) $< > $@.$$$$; \ + sed 's,($*).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ + clean: -rm -f *.$(EXT) *.o
cleaner: clean ! -rm -f *~ _* config.* *.d *.d.*
cleanest: cleaner ! -rm -f Makefile ../*.$(EXT)
! distclean: cleanest
install: install-bin install-doc *************** *** 66,71 **** echo " ./configure && make">>Makefile
! source: ! echo "SOURCES = \"> Make.source ! echo `ls mtx_*.c $(LIBNAME).c` >> Make.source ! echo >> Make.source --- 77,83 ---- echo " ./configure && make">>Makefile
! Makefile: Makefile.in configure ! ./configure ! ! configure: configure.ac ! autoconf
Index: configure.ac =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.ac 9 Jun 2005 19:07:13 -0000 1.3 --- configure.ac 15 Sep 2005 12:02:54 -0000 1.4 *************** *** 65,68 **** --- 65,76 ---- AC_CHECK_FUNCS(select socket strerror)
+ + ### make-depend flags + if test "x$ac_cv_c_compiler_gnu" = "xyes"; then + AC_SUBST(MAKEDEP_FLAGS, "-MM") + else + AC_SUBST(MAKEDEP_FLAGS, "-M") + fi + dnl check for "-mms-bitfields" cflag dnl why is there no generic compiler-check for a given flag ?