Update of /cvsroot/mahogany/M/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv909/src/Python
Modified Files:
Names.mk
Log Message:
fixed dependencies for Python objects when not using swig
Index: Names.mk
===================================================================
RCS file: /cvsroot/mahogany/M/src/Python/Names.mk,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -u -2 -r1.10 -r1.11
--- Names.mk 6 Jan 2004 00:31:24 -0000 1.10
+++ Names.mk 6 Jan 2004 01:03:53 -0000 1.11
@@ -14,7 +14,9 @@
# build .o file from a temporary .cpp generated from SWIG .i source: we don't
-# want to keep .cpp around, so erase it after compiling
+# want to keep .cpp around, so erase it after compiling and also make the .o
+# depend on the real source file and not on this intermediate .cpp one
define M_COMPILE_SWIG
$(CXX) -o $@ $(strip $(M_COMPILE_CXX)) $(@:.o=.cpp)
[EMAIL PROTECTED] -f $*.d && { sed -e "s,$(@:.o=.cpp),$<," $*.d >$*.d2 && rm -f $*.d
&& mv $*.d2 $*.d; }
@rm -f $(@:.o=.cpp)
endef
@@ -28,12 +30,6 @@
ifdef SWIG
-# the goal of this command is to make *.o file to depend on the *.i source,
-# not on the intermediate *.cpp generated from it
-define adjust_dep
[EMAIL PROTECTED] Python && \
-test ! -f $*.d || { sed -e "s,$(@:.o=.cpp),$<," $*.d >$*.d2 && rm -f $*.d && mv $*.d2
$*.d; }
-endef
-# and this one replaces #include Python.h in the generated C++ code with
+# this command replaces #include Python.h in the generated C++ code with
# #include MPython.h which we need for dynamic Python linking to work
define create_cpp
@@ -48,5 +44,4 @@
cd Python && $(create_cpp)
$(M_COMPILE_SWIG)
- $(adjust_dep)
# define rule for copying the swig-generated files back to the source tree:
@@ -61,9 +56,12 @@
else # !SWIG
+
vpath %.cpp-swig .src
%.o: %.cpp-swig
cp -f $< $*.cpp
- cp -f $*.py-swig $*.py
+ cp -f .src/$*.py-swig $*.py
$(M_COMPILE_SWIG)
+ @rm $*.py
+
endif # SWIG/!SWIG
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates