Changeset 12127


Ignore:
Timestamp:
09/01/09 09:14:45 (12 years ago)
Author:
Mark Evenson
Message:

Redo source distribution targets to explicitly change line endings.

'abcl.source.{tar,zip}' now explicit changes the EOL for most files to
'lf' (UNIX) for the tar, and to 'crf' (DOS) for the zip. The current
exception is that the 'abcl.in' script always gets 'lf' EOL, and the
'abcl.bat.in' always get 'crlf' EOL.

The 'abcl.source.eol' property has been removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/build.xml

    r12121 r12127  
    228228      <!-- Determine which ABCL version we have just built by parsing
    229229           the output of LISP-IMPLEMENTATION-VERSION. -->
     230      <!-- TODO As an optimization, we could possibly compare the timestamp
     231      of 'abcl.version.path' vs. org.armedbear.lisp.Version -->
    230232      <java fork="true"
    231233      classpath="${build.classes.dir}"
     
    401403      <include name="META-INF/services/javax.script.ScriptEngineFactory"/>
    402404    </patternset>
    403    
     405
    404406    <target name="abcl.source.prepare" depends="abcl.stamp.version">
    405       <property name="abcl.source.eol" value="asis"/>
    406       <echo>Using abcl.source.eol='${abcl.source.eol}' to drive
    407       source code line-ending transformations.</echo>
    408407      <property name="abcl.build.src.dir"
    409408    value="${build.dir}/abcl-src-${abcl.version}"/>
    410409      <mkdir dir="${abcl.build.src.dir}/src"/>
    411       <fixcrlf srcdir="${src.dir}"
    412          eol="${abcl.source.eol}"
    413          destdir="${abcl.build.src.dir}/src"
    414          preservelastmodified="true">
    415   <patternset refid="abcl.source.java"/>
    416   <patternset refid="abcl.source.lisp"/>
    417   <patternset refid="abcl.source.misc"/>
     410      <copy todir="${abcl.build.src.dir}/src"
     411            preservelastmodified="true">
     412        <fileset dir="${src.dir}"
     413                 id="abcl.source.src">
     414            <patternset refid="abcl.source.java"/>
     415            <patternset refid="abcl.source.lisp"/>
     416            <patternset refid="abcl.source.misc"/>
     417        </fileset>
     418      </copy>
     419      <copy todir="${abcl.build.src.dir}"
     420            preservelastmodified="true">
     421        <fileset dir="${basedir}">
     422            <patternset refid="abcl.dist.misc"/>
     423        </fileset>
     424      </copy>
     425    </target>
     426
     427    <!--  Files in source distribution that always get LF EOL (aka
     428         'unix') -->   
     429    <patternset id="abcl.dist.lf"
     430      <include name="abcl.in"/>
     431    </patternset>
     432
     433    <!--  Files in source distribution that always get CRLF EOL (aka
     434         'dos') -->   
     435    <patternset id="abcl.dist.crlf">
     436      <include name="abcl.bat.in"/>
     437    </patternset>
     438
     439    <target name="abcl.source.tar" depends="abcl.source.prepare">
     440      <fixcrlf srcdir="${abcl.build.src.dir}"
     441               preservelastmodified="true"
     442               eol="lf">
    418443      </fixcrlf>
    419       <fixcrlf srcdir="${basedir}"
    420          eol="${abcl.source.eol}"
    421          destdir="${abcl.build.src.dir}"
    422          preservelastmodified="true">
    423   <patternset refid="abcl.dist.misc"/>
     444
     445      <fixcrlf srcdir="${abcl.build.src.dir}"
     446               preservelastmodified="true"
     447               eol="crlf">
     448          <patternset refid="abcl.dist.crlf"/>
    424449      </fixcrlf>
    425     </target>
    426 
    427     <target name="abcl.source.tar" depends="abcl.source.prepare">
     450
     451      <fixcrlf srcdir="${abcl.build.src.dir}"
     452               preservelastmodified="true"
     453               eol="lf">
     454          <patternset refid="abcl.dist.lf"/>
     455      </fixcrlf>
     456
    428457      <mkdir dir="${dist.dir}"/>
    429458      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
     
    436465
    437466    <target name="abcl.source.zip" depends="abcl.source.prepare">
     467      <fixcrlf srcdir="${abcl.build.src.dir}"
     468               preservelastmodified="true"
     469               eol="crlf">
     470      </fixcrlf>
     471
     472      <fixcrlf srcdir="${abcl.build.src.dir}"
     473               preservelastmodified="true"
     474               eol="crlf">
     475          <patternset refid="abcl.dist.crlf"/>
     476      </fixcrlf>
     477
     478      <fixcrlf srcdir="${abcl.build.src.dir}"
     479               preservelastmodified="true"
     480               eol="lf">
     481          <patternset refid="abcl.dist.lf"/>
     482      </fixcrlf>
     483
    438484      <mkdir dir="${dist.dir}"/>
    439485      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
Note: See TracChangeset for help on using the changeset viewer.