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

tga at ci.uchicago.edu tga at ci.uchicago.edu
Tue Sep 20 14:20:32 CDT 2011


Author: tga
Date: 2011-09-20 14:20:31 -0500 (Tue, 20 Sep 2011)
New Revision: 5138

Modified:
   SwiftApps/SwiftR/Makefile
   SwiftApps/SwiftR/Swift/src/Makefile
Log:
Don't download ant unnecessarily, don't rebuild swift unnecessarily

Modified: SwiftApps/SwiftR/Makefile
===================================================================
--- SwiftApps/SwiftR/Makefile	2011-09-20 19:03:47 UTC (rev 5137)
+++ SwiftApps/SwiftR/Makefile	2011-09-20 19:20:31 UTC (rev 5138)
@@ -99,7 +99,7 @@
 $(SWIFT_SRC)/.built: $(COG_SRC)/.checkedout
 	(cd $(SWIFT_SRC) && ant dist && touch .built)
 
-$(COG_SRC)/.checkedout: Swift/src/Makefile
+$(COG_SRC)/.checkedout: checkout-swift.sh
 	sh checkout-swift.sh $(COG_SRC) $(SWIFT_PATCH_DIR)/$(SWIFT_SRC_PATCH) $(SWIFT_SRC_TAG) $(COG_SRC_TAG)
 	touch $(COG_SRC)/.checkedout
 

Modified: SwiftApps/SwiftR/Swift/src/Makefile
===================================================================
--- SwiftApps/SwiftR/Swift/src/Makefile	2011-09-20 19:03:47 UTC (rev 5137)
+++ SwiftApps/SwiftR/Swift/src/Makefile	2011-09-20 19:20:31 UTC (rev 5138)
@@ -64,9 +64,12 @@
 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
+	# hack to avoid redoing
+	if [ ! -f $(SWIFT_BIN) ]; then \
+	    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; \
+	fi




More information about the Swift-commit mailing list