[Swift-commit] r5134 - in SwiftApps/SwiftR: . Swift/src

tga at ci.uchicago.edu tga at ci.uchicago.edu
Tue Sep 20 12:00:37 CDT 2011


Author: tga
Date: 2011-09-20 12:00:37 -0500 (Tue, 20 Sep 2011)
New Revision: 5134

Added:
   SwiftApps/SwiftR/Swift/src/apache-ant-1.8.2-bin.shasum
Modified:
   SwiftApps/SwiftR/Makefile
   SwiftApps/SwiftR/Swift/src/Makefile
   SwiftApps/SwiftR/Swift/src/download-src.sh
Log:
Changed CRAN build process so that it doesn't expect ant to be installed.



Modified: SwiftApps/SwiftR/Makefile
===================================================================
--- SwiftApps/SwiftR/Makefile	2011-09-20 02:05:31 UTC (rev 5133)
+++ SwiftApps/SwiftR/Makefile	2011-09-20 17:00:37 UTC (rev 5134)
@@ -66,12 +66,14 @@
 
 $(CRAN_PKG): $(PACKAGE_DEPS) $(SWIFT_SRC_NAME).shasum
 	- if [ -d .svn -a -x "`which svn`" ]; then svn info > Swift/svninfo; fi
-	(cd Swift/src; make removeall)
+	make -C Swift/src removeall
 	cp $(SWIFT_SRC_NAME).shasum Swift/src
 	R CMD build Swift
 	mv $(GEN_PKG_NAME) $(CRAN_PKG) 
 
 $(FULL_PKG): $(PACKAGE_DEPS) $(SWIFT_SRC)/.built
+	- if [ -d .svn -a -x "`which svn`" ]; then svn info > Swift/svninfo; fi
+	make -C Swift/src removebuild # remove everything aside from final Swift
 	mkdir -p Swift/inst
 	rm -Rf ./$(SWIFT_INST)
 	cp -r $(SWIFT_DIST) $(SWIFT_INST)

Modified: SwiftApps/SwiftR/Swift/src/Makefile
===================================================================
--- SwiftApps/SwiftR/Swift/src/Makefile	2011-09-20 02:05:31 UTC (rev 5133)
+++ SwiftApps/SwiftR/Swift/src/Makefile	2011-09-20 17:00:37 UTC (rev 5134)
@@ -4,7 +4,12 @@
 # in the package.
 include make.include
 
+ANT_DIR = apache-ant-1.8.2
+ANT_PKG = apache-ant-1.8.2-bin.tar.bz2
+ANT_PKG_SHASUM = apache-ant-1.8.2-bin.shasum
 
+ANT_PKG_URL = http://www.apache.org/dist//ant/binaries/$(ANT_PKG)
+
 SWIFT_MODULE_SRC = $(SWIFT_SRC_NAME)/modules/swift
 
 SWIFT_DIST = $(SWIFT_MODULE_SRC)/dist/swift-svn
@@ -13,6 +18,8 @@
 
 SWIFT_BIN = $(SWIFT_INST)/bin/swift
 
+
+
 all: $(SWIFT_BIN)
 
 $(SWIFT_SRC_NAME)/.downloadedok: 
@@ -23,10 +30,12 @@
 	fi
 
 
-$(SWIFT_MODULE_SRC)/.built: $(SWIFT_SRC_NAME)/.downloadedok
+$(SWIFT_MODULE_SRC)/.built: $(SWIFT_SRC_NAME)/.downloadedok $(ANT_DIR)/.downloadedok
 	# hack to avoid rebuilding
 	if [ ! -f $(SWIFT_BIN) ]; then \
-	  (cd $(SWIFT_MODULE_SRC) && ant dist && touch .built); \
+	  java -Dant.home="$(pwd)/$(ANT_DIR)" -classpath $(ANT_DIR)/lib/ant-launcher.jar \
+	  	org.apache.tools.ant.launch.Launcher  -f $(SWIFT_MODULE_SRC)/build.xml dist && \
+	  touch $(SWIFT_MODULE_SRC)/.built; \
 	fi
 
 # Target to make sure that swift exists
@@ -38,8 +47,22 @@
 	  cp -r $(SWIFT_DIST) $(SWIFT_INST); \
 	fi
 
-removeall: removesrc
+removeall: removebuild
 	rm -rf ./$(SWIFT_INST)
 
-removesrc:
+
+removebuild:
+	rm -rf ./$(ANT_DIR) ./$(ANT_PKG)
 	rm -rf ./$(SWIFT_SRC_NAME)
+	rm -rf ./$(SWIFT_SRC_NAME).tar.gz
+	
+
+fetchant: $(ANT_DIR)/.downloadedok
+
+$(ANT_DIR)/.downloadedok:
+	rm -f $(ANT_PKG)
+	wget $(ANT_PKG_URL)
+	shasum --check $(ANT_PKG_SHASUM)
+	rm -rf $(ANT_DIR)
+	tar xjf $(ANT_PKG)
+	touch $(ANT_DIR)/.downloadedok

Added: SwiftApps/SwiftR/Swift/src/apache-ant-1.8.2-bin.shasum
===================================================================
--- SwiftApps/SwiftR/Swift/src/apache-ant-1.8.2-bin.shasum	                        (rev 0)
+++ SwiftApps/SwiftR/Swift/src/apache-ant-1.8.2-bin.shasum	2011-09-20 17:00:37 UTC (rev 5134)
@@ -0,0 +1 @@
+03f6cb7d052561d536bb8c0802874854c7e357d5  apache-ant-1.8.2-bin.tar.bz2

Modified: SwiftApps/SwiftR/Swift/src/download-src.sh
===================================================================
--- SwiftApps/SwiftR/Swift/src/download-src.sh	2011-09-20 02:05:31 UTC (rev 5133)
+++ SwiftApps/SwiftR/Swift/src/download-src.sh	2011-09-20 17:00:37 UTC (rev 5134)
@@ -7,6 +7,7 @@
     exit 1
 fi
 
+rm -f ${SWIFT_SRC_NAME}.tar.gz
 wget http://cs.uchicago.edu/~tga/swiftR/swift-source/${SWIFT_SRC_NAME}.tar.gz
 shasum --check ${SWIFT_SRC_NAME}.shasum
 




More information about the Swift-commit mailing list