Index: /issm/trunk/externalpackages/autotools/install-win.sh
===================================================================
--- /issm/trunk/externalpackages/autotools/install-win.sh	(revision 22028)
+++ /issm/trunk/externalpackages/autotools/install-win.sh	(revision 22029)
@@ -64,2 +64,7 @@
 # compiler.
 patch ./install/bin/automake < ./patches/automake.patch
+
+# This patch is for ar-lib, and removes carriage return characters that cause
+# commands to overwrite themselves and be misinterpreted during linking on 
+# Cygwin Windows.
+patch ./install/share/automake-1.14/ar-lib < ./patches/ar-lib.patch
Index: /issm/trunk/externalpackages/autotools/patches/ar-lib.patch
===================================================================
--- /issm/trunk/externalpackages/autotools/patches/ar-lib.patch	(revision 22029)
+++ /issm/trunk/externalpackages/autotools/patches/ar-lib.patch	(revision 22029)
@@ -0,0 +1,11 @@
+--- ar-lib	2017-08-30 21:58:06.863512300 -0700
++++ /home/Daniel/issm/trunk/aux-config/ar-lib	2017-08-30 21:58:01.291710300 -0700
+@@ -226,7 +226,7 @@
+   else
+     $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+     do
+-      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
++      $AR -NOLOGO -EXTRACT:"$(echo $member | tr -d '\r')" "$archive" || exit $?
+     done
+   fi
+ 
Index: /issm/trunk/jenkins/jenkins.sh
===================================================================
--- /issm/trunk/jenkins/jenkins.sh	(revision 22028)
+++ /issm/trunk/jenkins/jenkins.sh	(revision 22029)
@@ -10,4 +10,5 @@
 #Server URI
 SERVER='https://ross.ics.uci.edu:8080'
+#SERVER='http://ross.ics.uci.edu:8080'
 
 #Get configuration
@@ -29,4 +30,5 @@
 MATLAB_TEST=0
 PYTHON_TEST=0
+JAVASCRIPT_TEST=0
 
 #source configuration script
@@ -58,6 +60,7 @@
 	#Process html page and get the list of files that has changed (tricky...)
 	#cat changes | grep '="The file was modified"' | sed -e 's/.*<\/td><td><a>\(.*\)<\/a><\/td><td>.*/\1/' > $ISSM_DIR/TEMP
-	cat changes | grep 'document_edit' |sed -e 's/document_edit.png/document_edit.png\
-		/g' | sed -e 's/.*<\/a><\/td><td>\(.*\)<\/td><\/tr>.*/\1/' | grep -v 'document_edit.png' > $ISSM_DIR/TEMP
+	#cat changes | grep 'document_edit' |sed -e 's/document_edit.png/document_edit.png\
+		#/g' | sed -e 's/.*<\/a><\/td><td>\(.*\)<\/td><\/tr>.*/\1/' | grep -v 'document_edit.png' > $ISSM_DIR/TEMP
+	cat changes  | tr " " "\n" | grep trunk |  sed -e 's/.*<a>\(.*\)<\/a>.*/\1/' > $ISSM_DIR/TEMP
 
 	#Print list of files
@@ -124,7 +127,11 @@
 echo "<testsuite tests=\"$NUMPACKAGES\">" > $EXTERNAL_TEST_FILE
 
-# Need a source here for when builds start midway through installation of 
-# externalpackages.
+# Need a source here for when builds start midway through installation of externalpackages.
 source $ISSM_DIR/etc/environment.sh
+
+if [ "$OS" == "win" ]; then
+	echo " == WINDOWS ENVIRONMENT DETECTED =="
+	source $ISSM_DIR/externalpackages/windows/windows_environment.sh
+fi
 
 EXTERNALPACKAGES_FAILED=0;
@@ -140,5 +147,5 @@
 
 	#install if requested or if previous install has not been successful
-	if [ "$ISSM_EXTERNALPACKAGES" == "yes" ] || [ ! -d ./install ] || [ ! "$(ls -A ./install)" ]; then
+	if [ "$ISSM_EXTERNALPACKAGES" == "yes" ] || [ ! -d ./install -a ! -d ./install-javascript ] || ([ -d ./install ] && [ ! "$(ls -A ./install)" ]) || ([ -d ./install-javascript ] && [ ! "$(ls -A ./install-javascript)" ]); then
 		echo "======================================================";
 		echo "       Installing $PACKAGENAME                        ";
@@ -146,5 +153,5 @@
 
 		./$PACKAGEINST &> compil.log
-		if [ $? -ne 0 ]; then
+		if [ $? -ne 0 ] && [ "$PACKAGENAME" != "boost" ]; then
 			echo "======================================================";
 			echo "    ERROR: installation of $PACKAGENAME failed        ";
@@ -180,11 +187,21 @@
 fi
 
+# Source here to include any newly installed externalpackages on the path. 
 source $ISSM_DIR/etc/environment.sh
 
-if [ "$OS" == "win" ]
-then
+if [ "$OS" == "win" ]; then
 	echo " == WINDOWS ENVIRONMENT DETECTED =="
 	source $ISSM_DIR/externalpackages/windows/windows_environment.sh
 fi
+
+#Set CXX/CC flags for JS runs after exnteralpackages to avoid conflicts during their compilation
+CXX_PREVIOUS=$CXX
+CC_PREVIOUS=$CC
+if [ $JAVASCRIPT_TEST -eq 1 ]; then
+	export CXX=em++
+	export CC=emcc
+	source $ISSM_DIR/externalpackages/emscripten/install/emsdk_env.sh
+fi
+
 #}}}
 #ISSM compilation yes/no                (ISSM_COMPILATION) {{{
@@ -200,5 +217,15 @@
 		make distclean
 		./scripts/automakererun.sh
+		if [ $? -ne 0 ]; then 
+			echo "autoreconf failed!"
+			exit 1
+		fi
 		eval "./configure $ISSM_CONFIG"
+		if [ $? -ne 0 ]; then 
+			echo "ISSM configuration failed (see options below)"
+			echo $ISSM_CONFIG
+			echo "ISSM configuration failed!"
+			exit 1
+		fi
 	fi
 
@@ -226,4 +253,8 @@
 fi
 #}}}
+
+#Restore CXX/CC to their previous values 
+export CXX=$CXX_PREVIOUS
+export CC=$CC_PREVIOUS
 
 #matlab tests
