You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/10/03 10:56:32 UTC

svn commit: r452353 - in /incubator/harmony/enhanced/classlib/trunk: build.xml depends/libs/build/fetch-awt-depends.sh make/depends.xml make/properties.xml

Author: hindessm
Date: Tue Oct  3 01:56:31 2006
New Revision: 452353

URL: http://svn.apache.org/viewvc?view=rev&rev=452353
Log:
Migrate unix fetch-awt-depends.sh behaviour to make/depends.xml (in
preparation for the windows equivalent [hopefully] being placed in the
same file).

Modified:
    incubator/harmony/enhanced/classlib/trunk/build.xml
    incubator/harmony/enhanced/classlib/trunk/depends/libs/build/fetch-awt-depends.sh
    incubator/harmony/enhanced/classlib/trunk/make/depends.xml
    incubator/harmony/enhanced/classlib/trunk/make/properties.xml

Modified: incubator/harmony/enhanced/classlib/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/build.xml?view=diff&rev=452353&r1=452352&r2=452353
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/build.xml Tue Oct  3 01:56:31 2006
@@ -258,6 +258,10 @@
         <md5sum file="${deploy.zip}" />
     </target>
 
+    <target name="check-depends">
+        <ant antfile="make/depends.xml" inheritall="false" target="check" />
+    </target>
+
     <target name="fetch-depends">
         <ant antfile="make/depends.xml" inheritall="false" target="download" />
     </target>

Modified: incubator/harmony/enhanced/classlib/trunk/depends/libs/build/fetch-awt-depends.sh
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/depends/libs/build/fetch-awt-depends.sh?view=diff&rev=452353&r1=452352&r2=452353
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/depends/libs/build/fetch-awt-depends.sh (original)
+++ incubator/harmony/enhanced/classlib/trunk/depends/libs/build/fetch-awt-depends.sh Tue Oct  3 01:56:31 2006
@@ -1,87 +1,14 @@
 #!/bin/sh
 
-for d in depends make modules ;do
-  if [ \! -d $d ]; then
-    echo no $d directory
-    echo this script should be run from classlib top-level directory
-    echo
-    echo sh depends/libs/build/fetch-awt-swing.sh
-    exit 1
-  fi
-done
-
-LCMS_HOME=/usr
-mkdir -p depends/libs/build/lcms
-while read s t 
-do
-  src=$LCMS_HOME/$s
-  tgt=depends/libs/build/lcms/$t
-  if [ \! -e $src ]; then
-    echo $src not found
-    echo liblcms development package not install
-    echo for debian/ubuntu try: apt-get install liblcms1-dev
-    exit 1
-  fi
-  if [ -e $tgt ]; then
-    echo $tgt exists
-  else
-    echo Linking $src to $tgt
-    ln -s $src $tgt
-  fi
-done <<EOF
-  lib/liblcms.a liblcms.ia32
-  include/icc34.h icc34.h
-  include/lcms.h lcms.h
-EOF
-
-PNG_HOME=/usr
-mkdir -p depends/libs/build/png
-while read s t 
-do
-  src=$PNG_HOME/$s
-  tgt=depends/libs/build/png/$t
-  if [ \! -e $src ]; then
-    echo $src not found
-    echo libpng development package not install
-    echo for debian/ubuntu try: apt-get install libpng12-dev
-    exit 1
-  fi
-  if [ -e $tgt ]; then
-    echo $tgt exists
-  else
-    echo Linking $src to $tgt
-    ln -s $src $tgt
-  fi
-done <<EOF
-  lib/libpng.a libpng.ia32
-  include/pngconf.h pngconf.h
-  include/png.h png.h
-EOF
-
-JPEG_HOME=/usr
-mkdir -p depends/libs/build/jpeg
-while read s t 
-do
-  src=$JPEG_HOME/$s
-  tgt=depends/libs/build/jpeg/$t
-  if [ \! -e $src ]; then
-    echo $src not found
-    echo libjpeg development package not install
-    echo for debian/ubuntu try: apt-get install libjpeg62-dev
-    exit 1
-  fi
-  if [ -e $tgt ]; then
-    echo $tgt exists
-  else
-    echo Linking $src to $tgt
-    ln -s $src $tgt
-  fi
-done <<EOF
-  lib/libjpeg.a libjpeg.ia32
-  include/jconfig.h jconfig.lnx
-  include/jpeglib.h jpeglib.h
-  include/jmorecfg.h jmorecfg.h
-  include/jerror.h jerror.h
-EOF
-
+echo 
+echo '****************************************************************'
+echo 
+echo $0
+echo
+echo \"ant fetch-depends\" has been updated and this script is now
+echo obsolete. \ It is no longer necessary to run this script.
+echo 
+echo '****************************************************************'
+echo 
+sleep 3
 exit

Modified: incubator/harmony/enhanced/classlib/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/depends.xml?view=diff&rev=452353&r1=452352&r2=452353
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.xml Tue Oct  3 01:56:31 2006
@@ -29,7 +29,8 @@
     <import file="${basedir}/make/properties.xml" />
 
     <target name="check" description="Check whether dependencies are available"
-            depends="-check,-create-unsigned-bcprov-jar,-check-win" />
+            depends="-check,-create-unsigned-bcprov-jar,
+                     -check-win,-check-unix" />
 
     <target name="-check">
 
@@ -77,6 +78,66 @@
 
     </target>
 
+    <target name="-check-unix" if="is.unix">
+        
+        <property name="lcms.msg"
+                  value="liblcms development package not installed
+${line.separator}For Debian/Ubuntu try: apt-get install liblcms1-dev" />
+        <mkdir dir="depends/libs/build/lcms" />
+        <check-one-link src="${lcms.home}/lib/liblcms.a"
+                        dest="depends/libs/build/lcms/liblcms.ia32"
+                        message="${lcms.msg}" />
+        <check-one-link src="${lcms.home}/include/icc34.h"
+                        dest="depends/libs/build/lcms/icc34.h"
+                        message="${lcms.msg}" />
+        <check-one-link src="${lcms.home}/include/lcms.h"
+                        dest="depends/libs/build/lcms/lcms.h"
+                        message="${lcms.msg}" />
+
+
+        <property name="png.msg"
+                  value="libpng development package not installed
+${line.separator}For Debian/Ubuntu try: apt-get install libpng12-dev" />
+        <mkdir dir="depends/libs/build/png" />
+        <check-one-link src="${png.home}/lib/libpng.a"
+                        dest="depends/libs/build/png/libpng.ia32"
+                        message="${png.msg}" />
+        <check-one-link src="${png.home}/include/pngconf.h"
+                        dest="depends/libs/build/png/pngconf.h"
+                        message="${png.msg}" />
+        <check-one-link src="${png.home}/include/png.h"
+                        dest="depends/libs/build/png/png.h"
+                        message="${png.msg}" />
+
+
+        <property name="jpeg.msg"
+                  value="libjpeg development package not installed
+${line.separator}For Debian/Ubuntu try: apt-get install libjpeg62-dev" />
+        <mkdir dir="depends/libs/build/jpeg" />
+        <check-one-link src="${jpeg.home}/lib/libjpeg.a"
+                        dest="depends/libs/build/jpeg/libjpeg.ia32"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jconfig.h"
+                        dest="depends/libs/build/jpeg/jconfig.lnx"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jpeglib.h"
+                        dest="depends/libs/build/jpeg/jpeglib.h"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jpeglib.h"
+                        dest="depends/libs/build/jpeg/jpeglib.h"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jpeglib.h"
+                        dest="depends/libs/build/jpeg/jpeglib.h"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jmorecfg.h"
+                        dest="depends/libs/build/jpeg/jmorecfg.h"
+                        message="${jpeg.msg}" />
+        <check-one-link src="${jpeg.home}/include/jerror.h"
+                        dest="depends/libs/build/jpeg/jerror.h"
+                        message="${jpeg.msg}" />
+
+    </target>
+
     <target name="download" description="Download required jars"
             depends="-download,-download-win" />
 
@@ -234,4 +295,51 @@
              manifest="${bcprov.dir}/temp/META-INF/MANIFEST.MF" />
 	<delete dir="${bcprov.dir}/temp" />
     </target>
+
+    <macrodef name="check-one-link">
+        <attribute name="src" />
+        <attribute name="dest" />
+        <attribute name="message" />
+        <sequential>
+            <echo>Checking for @{dest}</echo>
+	    <available file="@{dest}" type="file"
+                       property="@{dest}.exists" />
+	    <available file="@{src}" type="file"
+                       property="@{src}.exists" />
+	    <fail>
+		<condition>
+                    <and>
+		        <not>
+			    <isset property="@{dest}.exists" />
+                        </not>
+                        <not>
+			    <isset property="@{src}.exists" />
+		        </not>
+                    </and>
+		</condition>
+...
+
+Missing dependency.  The file from:
+
+  @{src}
+
+should be linked to:
+
+  @{dest}
+
+But @{src} doesn't exist.
+@{message}
+            </fail>
+            <antcall target="-really-link">
+                <param name="src" value="@{src}" />
+                <param name="dest" value="@{dest}" />
+            </antcall>
+        </sequential>
+    </macrodef>
+
+    <target name="-really-link" unless="${dest}.exists">
+        <echo>Linking ${dest}</echo>
+        <symlink resource="${src}" link="${dest}" />
+    </target>
+
 </project>

Modified: incubator/harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/properties.xml?view=diff&rev=452353&r1=452352&r2=452353
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/properties.xml Tue Oct  3 01:56:31 2006
@@ -126,6 +126,10 @@
     </condition>
     <property name="make.command" value="make" />
 
+    <property name="png.home" value="/usr" />
+    <property name="lcms.home" value="/usr" />
+    <property name="jpeg.home" value="/usr" />
+
     <target name="echo" depends="svn-prop, svn-info" >
         <echo>
 Harmony javac properties: