From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 02/12] guix: ant-build-system: use abs path as basedir Date: Fri, 9 Sep 2016 16:51:02 +0200 Message-ID: <1473432672-21007-3-git-send-email-h.goebel@crazy-compilers.com> References: <1473432672-21007-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biN9H-00076T-Li for guix-devel@gnu.org; Fri, 09 Sep 2016 10:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biN9D-0002vr-HT for guix-devel@gnu.org; Fri, 09 Sep 2016 10:51:22 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:37429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biN9D-0002vY-AS for guix-devel@gnu.org; Fri, 09 Sep 2016 10:51:19 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3sW0Wp4zlGz3hkLl for ; Fri, 9 Sep 2016 16:51:18 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3sW0Wp4vJqzvlQ9 for ; Fri, 9 Sep 2016 16:51:18 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 7Du3le_3Jj2P for ; Fri, 9 Sep 2016 16:51:17 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-128-63.dynamic.mnet-online.de [188.174.128.63]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Fri, 9 Sep 2016 16:51:17 +0200 (CEST) Received: from thisbe.goebel-consult.de.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id A3A7E60BD5 for ; Fri, 9 Sep 2016 16:51:14 +0200 (CEST) In-Reply-To: <1473432672-21007-1-git-send-email-h.goebel@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This allows to chdir into some sub-project prior to building. * guix/build/ant-build-system.scm (default-build.xml): Add parameter. (configure): Pass current directory as base-dir to default-build.xml. --- guix/build/ant-build-system.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm index 651150d..f28182a 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -35,12 +35,12 @@ ;; ;; Code: -(define (default-build.xml src-dir jar-name prefix) +(define (default-build.xml base-dir src-dir jar-name prefix) "Create a simple build.xml with standard targets for Ant." (call-with-output-file "build.xml" (lambda (port) (sxml->xml - `(project (@ (basedir ".") + `(project (@ (basedir ,base-dir) (name ,jar-name)) (property (@ (name "classes.dir") (value "${basedir}/build/classes"))) @@ -102,7 +102,7 @@ to the default GNU unpack strategy." (define* (configure #:key inputs outputs (jar-name #f) (src-dir "src") #:allow-other-keys) (when jar-name - (default-build.xml src-dir jar-name + (default-build.xml (getcwd) src-dir jar-name (string-append (assoc-ref outputs "out") "/share/java"))) (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) -- 2.7.4