[Swift-commit] r7997 - trunk

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Sat Jul 12 01:27:14 CDT 2014


Author: hategan
Date: 2014-07-12 01:27:14 -0500 (Sat, 12 Jul 2014)
New Revision: 7997

Modified:
   trunk/build.xml
   trunk/launchers.xml
Log:
updated launcher business with custom swift launchers

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2014-07-12 06:26:17 UTC (rev 7996)
+++ trunk/build.xml	2014-07-12 06:27:14 UTC (rev 7997)
@@ -65,7 +65,7 @@
 
 	<target name="etc">
 		<copy todir="${dist.dir}/etc">
-			<fileset dir="${cog.dir}/modules/${module.name}/etc"/>
+			<fileset dir="${cog.dir}/modules/${module.name}/etc" excludes="launcher-template*"/>
 		</copy>
 	</target>
 
@@ -287,7 +287,44 @@
         	</classpath>
         </java>
 	</target>
+	
+	<target name="swift.launcher">
+		<condition property="launcher.exists">
+			<and>
+				<available file="${dist.dir}/bin/${launcher-name}"/>
+				<available file="${dist.dir}/bin/${launcher-name}.bat"/>
+			</and>
+		</condition>
+		<antcall target="create.swift.launcher">
+			<param name="class-name" value="${class-name}"/>
+			<param name="launcher-name" value="${launcher-name}"/>
+		</antcall>
+	</target>
+    
+	<target name="create.swift.launcher" unless="launcher.exists">
+		<echo message="[${module.name}]: LAUNCHER ${launcher-name}"/>
+		<property name="umask" value=""/>
+		<filter token="class" value="${class-name}"/>
+		<filter token="jar" value="${jar.name}"/>
+		<filter token="umask" value="${umask}"/>
 
+		<copy file="${cog.dir}/modules/swift/etc/launcher-template"
+			tofile="${dist.dir}/bin/${launcher-name}"
+			filtering="true"/>
+		<copy file="${cog.dir}/modules/swift/etc/launcher-template.bat"
+			tofile="${dist.dir}/bin/${launcher-name}.bat"
+			filtering="true"/>
+		<chmod file="${dist.dir}/bin/${launcher-name}" perm="+x"/>
+		<!-- Just in case... -->
+		<fixcrlf srcdir="${dist.dir}/bin"
+			eol="lf"
+			includes="${launcher-name}" />
+		<fixcrlf srcdir="${dist.dir}/bin"
+			eol="crlf"
+			includes="${launcher-name}.bat" />
+	</target>
+
+
 	<!-- ================================================ -->
 	<!-- Compile                                          -->
 	<!-- ================================================ -->

Modified: trunk/launchers.xml
===================================================================
--- trunk/launchers.xml	2014-07-12 06:26:17 UTC (rev 7996)
+++ trunk/launchers.xml	2014-07-12 06:27:14 UTC (rev 7997)
@@ -8,15 +8,15 @@
 			<property name="launcher-name" value="VDLt2VDLx"/>
 			<property name="class-name" value="org.griphyn.vdl.toolkit.VDLt2VDLx"/>
 		</ant>
-		<ant antfile="${main.buildfile}" target="launcher">
+		<ant antfile="build.xml" target="swift.launcher">
 			<property name="launcher-name" value="swift-log-info"/>
 			<property name="class-name" value="org.griphyn.vdl.karajan.monitor.monitors.http.SwiftLogInfo"/>
 		</ant>
-		<ant antfile="${main.buildfile}" target="launcher">
+		<ant antfile="build.xml" target="swift.launcher">
 			<property name="launcher-name" value="swift-convert-config"/>
 			<property name="class-name" value="org.griphyn.vdl.util.ConvertConfig"/>
 		</ant>
-		<ant antfile="${main.buildfile}" target="launcher">
+		<ant antfile="build.xml" target="swift.launcher">
 			<property name="launcher-name" value="swift-config-info"/>
 			<property name="class-name" value="org.griphyn.vdl.util.SwiftConfigInfo"/>
 		</ant>




More information about the Swift-commit mailing list