r36421 - /packages/fenics/dolfin/trunk/debian/rules

johannr-guest at users.alioth.debian.org johannr-guest at users.alioth.debian.org
Mon Apr 26 07:17:52 UTC 2010


Author: johannr-guest
Date: Mon Apr 26 07:17:41 2010
New Revision: 36421

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36421
Log:
Simpler way of building for multiple Python versions.

Modified:
    packages/fenics/dolfin/trunk/debian/rules

Modified: packages/fenics/dolfin/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/fenics/dolfin/trunk/debian/rules?rev=36421&op=diff
==============================================================================
--- packages/fenics/dolfin/trunk/debian/rules (original)
+++ packages/fenics/dolfin/trunk/debian/rules Mon Apr 26 07:17:41 2010
@@ -1,6 +1,5 @@
 #!/usr/bin/make -f
 
-unexport CXXFLAGS
 ifneq (,$(DEB_MAINTAINER_MODE))
   # Enable stuff not policy compliant (eg. unsuitable for build daemons)
   DEB_COPYRIGHT_CHECK_STRICT = yes
@@ -21,6 +20,8 @@
 DEB_INSTALL_DOCS_ALL += AUTHORS README TODO
 
 DEB_DH_INSTALL_SOURCEDIR = debian/tmp
+
+DEB_SCONS_INVOKE = `which scons` --directory="$(DEB_BUILDDIR)"
 
 DEB_SCONS_CONFIGURE_TARGET = configure
 DEB_SCONS_CONFIGURE_OPTIONS = \
@@ -52,18 +53,6 @@
 
 PYVERSIONS = $(shell pyversions --requested debian/control)
 
-SCONS = `which scons`
-
-pre-build:: $(addprefix pre-build-stamp-, $(PYVERSIONS))
-pre-build-stamp-%:
-# Prepare build directories
-	mkdir build-$*
-	cp -r `ls | grep -vE '(build-|pre-build-|debian)'` build-$*
-	touch $@
-
-post-patches::
-	$(SCONS) $(DEB_SCONS_CONFIGURE_TARGET) $(DEB_SCONS_CONFIGURE_OPTIONS)
-
 clean::
 	find dolfin -name "*.os" | xargs rm -f
 	find dolfin -name "*.so*" | xargs rm -f
@@ -76,26 +65,17 @@
 	rm -f simula_scons.log
 	rm -f dolfin.conf
 	rm -f doc/manual/dolfin-user-manual.{aux,bbl,blg,dvi,idx,ilg,ind,log,out,pdf,ps,toc}
-	-rm -rf $(addprefix build-, $(PYVERSIONS))
-	-rm -rf $(addprefix configure-stamp-, $(PYVERSIONS))
-	-rm -rf $(addprefix build-stamp-, $(PYVERSIONS))
-	-rm -rf $(addprefix install-stamp-, $(PYVERSIONS))
-	-rm -rf $(addprefix pre-build-stamp-, $(PYVERSIONS))
+	rm -rf $(addprefix install-stamp-, $(PYVERSIONS))
 
-common-configure-arch:: $(addprefix configure-stamp-, $(PYVERSIONS))
-configure-stamp-%:
-	cd build-$* && `which $*` $(SCONS) $(DEB_SCONS_CONFIGURE_TARGET) \
+# Re-configure, build, and install for all versions of Python
+install/python-pydolfin0:: $(addprefix install-stamp-, $(PYVERSIONS))
+install-stamp-%:
+	rm -f scons/pkgconfig/python*.pc
+	rm -f scons/pkgconfig/numpy*.pc
+	`which $*` $(DEB_SCONS_INVOKE) $(DEB_SCONS_CONFIGURE_TARGET) \
 	  $(DEB_SCONS_CONFIGURE_OPTIONS)
-	touch $@
-
-common-build-arch:: $(addprefix build-stamp-, $(PYVERSIONS))
-build-stamp-%:
-	cd build-$* && `which $*` $(SCONS) $(DEB_SCONS_BUILD_OPTIONS)
-	touch $@
-
-common-install-arch:: $(addprefix install-stamp-, $(PYVERSIONS))
-install-stamp-%:
-	cd build-$* && `which $*` $(SCONS) $(DEB_SCONS_INSTALL_TARGET) \
+	`which $*` $(DEB_SCONS_INVOKE) $(DEB_SCONS_BUILD_OPTIONS)
+	`which $*` $(DEB_SCONS_INVOKE) $(DEB_SCONS_INSTALL_TARGET) \
 	  $(DEB_SCONS_INSTALL_OPTIONS)
 	touch $@
 




More information about the debian-science-commits mailing list