Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv3991/include

Modified Files:
        Makefile 
Log Message:
added update target to regenerate the *.*.m4 files

Index: Makefile
===================================================================
RCS file: /cvsroot/mahogany/M/include/Makefile,v
retrieving revision 1.23
retrieving revision 1.24
diff -b -u -2 -r1.23 -r1.24
--- Makefile    15 Mar 2001 02:07:21 -0000      1.23
+++ Makefile    18 Jun 2002 21:45:57 -0000      1.24
@@ -1,9 +1,16 @@
 # Makefile for include directory
+#
+# Here we produce the files MInterface.cpp and MInterface.h in the build
+# directory from MInterface.mid using m4 and we also have an update target to
+# copy these generated files back to the source directory from where they can
+# be checked in the cvs
 
 MID:=$(wildcard .src/*.mid)
-M4DEF:=$(wildcard .src/*.m4)
+M4DEF:=$(wildcard .src/mid2*.m4)
 IDLFILES:=$(patsubst .src/%.mid,%.idl,$(MID))
 INTERFACES:=$(IDLFILES:.idl=.h)
 CPPFILES:=$(IDLFILES:.idl=.cpp)
+SRC_INTERFACES:=$(patsubst %,.src/%,$(INTERFACES:.h=.h.m4))
+SRC_CPPFILES:=$(patsubst %,.src/%,$(CPPFILES:.cpp=.cpp.m4))
 
 include ../makeopts
@@ -40,4 +47,16 @@
 install:
        @true
+
+ifdef M4
+# this target updates the .*.m4 files in the source tree from the regenerated
+# versions
+%.cpp.m4: %.cpp
+       cp $< $@
+
+%.h.m4: %.h
+       cp $< $@
+
+update: $(SRC_INTERFACES) $(SRC_CPPFILES)
+endif
 
 $(IDLFILES) $(INTERFACES) $(CPPFILES): $(MID) $(M4DEF)


----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                   >>>     http://thinkgeek.com/sf    <<<

_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to