]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
classpath: Use generic check for host program
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Sat, 3 May 2014 22:45:44 +0000 (00:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 14 Jun 2014 17:55:28 +0000 (19:55 +0200)
Remove the specific check that was done in dependencies.sh to use the
generic one that were introduced by the previous patch.

Also, introduce, BR2_NEEDS_HOST_JAVAC and BR2_NEEDS_HOST_JAR as it is
needed by classpath.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Config.in
package/classpath/Config.in
support/dependencies/dependencies.sh

index 8ff725a426a9bf13f62b95b68e19010ff4a78398..f13ae367d0a314aa457627f202c22e2883eadfe9 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -23,6 +23,16 @@ config BR2_EXTERNAL
 config BR2_NEEDS_HOST_JAVA
        bool
 
+# Hidden boolean selected by packages in need of javac in order to build
+# (example: classpath)
+config BR2_NEEDS_HOST_JAVAC
+       bool
+
+# Hidden boolean selected by packages in need of jar in order to build
+# (example: classpath)
+config BR2_NEEDS_HOST_JAR
+       bool
+
 # Hidden boolean selected by pre-built packages for x86, when they
 # need to run on x86-64 machines (example: pre-built external
 # toolchains, binary tools like SAM-BA, etc.).
index 0153bca070366f5d0a568119374293ddc1438583..a11845c75ebe7cc6b5e7a472fbbd57f0470ae4e7 100644 (file)
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_CLASSPATH
        bool "classpath"
+       select BR2_NEEDS_HOST_JAR
+       select BR2_NEEDS_HOST_JAVAC
        depends on BR2_PACKAGE_JAMVM
        depends on BR2_INET_IPV6
        help
index 655b4c6346aaf34894514fdf28353645b1722c9c..255a07b08f5551c77044979b87d0c15754bd0023 100755 (executable)
@@ -187,20 +187,18 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BR2_CONFIG > /dev/null && \
        fi
 fi
 
-if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then
-       for prog in javac jar; do
-               if ! which $prog > /dev/null ; then
-                       echo >&2
-                       echo "You must install '$prog' on your build machine" >&2
-                       exit 1
-               fi
-       done
-fi
-
 if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
        check_prog_host "java"
 fi
 
+if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then
+       check_prog_host "javac"
+fi
+
+if grep -q ^BR2_NEEDS_HOST_JAR=y $BR2_CONFIG ; then
+       check_prog_host "jar"
+fi
+
 if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
        if test ! -f /lib/ld-linux.so.2 ; then
                echo