[GRASS-SVN] r33478 - in grass/branches/develbranch_6/swig/python: . NumPtr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 17 03:33:30 EDT 2008


Author: hamish
Date: 2008-09-17 03:33:30 -0400 (Wed, 17 Sep 2008)
New Revision: 33478

Modified:
   grass/branches/develbranch_6/swig/python/Makefile.in
   grass/branches/develbranch_6/swig/python/NumPtr/Makefile
Log:
build bytecode .pyc files; recursive clean

Modified: grass/branches/develbranch_6/swig/python/Makefile.in
===================================================================
--- grass/branches/develbranch_6/swig/python/Makefile.in	2008-09-17 07:17:15 UTC (rev 33477)
+++ grass/branches/develbranch_6/swig/python/Makefile.in	2008-09-17 07:33:30 UTC (rev 33478)
@@ -1,3 +1,4 @@
+# Cloned automatically from Makefile.in by configure.
 MODULE_TOPDIR = ../..
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
@@ -6,15 +7,14 @@
 LIB_NAME = python_grass6
 
 CFLAGS=-c -fpic -I. $(ARCH_INC) $(GDALCFLAGS) $(PYTHONCFLAGS)
-
 LDFLAGS=-shared -L$(ARCH_LIBDIR) $(GDALLIBS) $(PYTHONLDFLAGS) $(VECTLIB) $(IMAGERYLIB) $(GMATHLIB) $(GISLIB)
 
-#include $(MODULE_TOPDIR)/include/Make/Dir.make
 
 default: _$(LIB_NAME).so numptr
 
 clean:
 	-rm -f *.o *.so $(LIB_NAME)_wrap.c $(LIB_NAME).pyc $(LIB_NAME).py
+	$(MAKE) -C NumPtr clean
 
 distclean: clean
 	-rm -f Makefile
@@ -22,12 +22,13 @@
 $(LIB_NAME)_wrap.c: $(LIB_NAME).i
 	$(SWIG) $(ARCH_INC) -python -shadow $<
 
-
 $(LIB_NAME)_wrap.o: $(LIB_NAME)_wrap.c
 	$(CC) $(CFLAGS) $(INCLUDE_DIRS) $<
 
 _$(LIB_NAME).so: $(LIB_NAME)_wrap.o
 	$(LD) $(LDFLAGS) $< -o _$(LIB_NAME).so
+	# build bytecode .pyc file; ignore undefined symbol error
+	echo "import $(LIB_NAME)" | python; true
 
 numptr:
 	$(MAKE) -C NumPtr

Modified: grass/branches/develbranch_6/swig/python/NumPtr/Makefile
===================================================================
--- grass/branches/develbranch_6/swig/python/NumPtr/Makefile	2008-09-17 07:17:15 UTC (rev 33477)
+++ grass/branches/develbranch_6/swig/python/NumPtr/Makefile	2008-09-17 07:33:30 UTC (rev 33478)
@@ -3,8 +3,9 @@
 all: numptr
 
 numptr:
-	python setup.py build
-	#python build/lib.linux-i686-2.4/test.py
+	python setup.py build --build-lib build/lib
+	# build bytecode .pyc file
+	python build/lib/test.py
 
 clean:
 	-rm -rf build/



More information about the grass-commit mailing list