[Swift-commit] r3995 - SwiftApps/SwiftR

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jan 18 10:29:25 CST 2011


Author: tga
Date: 2011-01-18 10:29:24 -0600 (Tue, 18 Jan 2011)
New Revision: 3995

Added:
   SwiftApps/SwiftR/Makefile
Removed:
   SwiftApps/SwiftR/install.sh
Log:
Replace install.sh with a makefile, with separate build, install and publish targets.  Also now it gets the version number automatically from the R package description file.


Added: SwiftApps/SwiftR/Makefile
===================================================================
--- SwiftApps/SwiftR/Makefile	                        (rev 0)
+++ SwiftApps/SwiftR/Makefile	2011-01-18 16:29:24 UTC (rev 3995)
@@ -0,0 +1,35 @@
+
+# Extract the version number from the R package description file
+# There should be a line in the file of the form:
+# Version: (major).(minor)
+SWIFTR_VERSION=$(shell sed -n -r 's/^Version:(\W*)([[:digit:]]+\.[[:digit:]])/\2/p' Swift/DESCRIPTION)
+
+SW := $(shell which swift)
+SWIFT_PATH := $(shell cd `dirname $(SW)`/..; pwd)
+
+TBALL=SWIFT_$(SWIFTR_VERSION).tar.gz
+
+all: build
+
+
+build: $(TBALL)
+
+
+publish: $(TBALL)
+	cp $(TBALL) ~/public_html
+
+install: $(TBALL)
+	R CMD INSTALL $(TBALL)
+
+clean: 
+	rm -rf Swift/inst/swift/*
+
+$(TBALL): 
+	mkdir -p Swift/inst/swift
+	cp -pr $(SWIFT_PATH)/* Swift/inst/swift
+	R CMD build Swift
+
+checkversion: 
+	echo SwiftR version is $(SWIFTR_VERSION) according to Swift/DESCRIPTION file
+
+

Deleted: SwiftApps/SwiftR/install.sh
===================================================================
--- SwiftApps/SwiftR/install.sh	2011-01-18 06:35:03 UTC (rev 3994)
+++ SwiftApps/SwiftR/install.sh	2011-01-18 16:29:24 UTC (rev 3995)
@@ -1,8 +0,0 @@
-ver=0.1
-rm -rf Swift/inst/swift/*
-mkdir -p Swift/inst/swift
-SWIFTREL=$(cd $(dirname $(which swift))/..; pwd)
-cp -pr $SWIFTREL/* Swift/inst/swift
-R CMD build Swift
-R CMD INSTALL Swift_${ver}.tar.gz
-cp Swift_${ver}.tar.gz ~/public_html




More information about the Swift-commit mailing list