Changeset 15022


Ignore:
Timestamp:
05/29/17 11:53:46 (6 years ago)
Author:
Mark Evenson
Message:

contrib/abcl-build: now runs on new build download infrastructure

Incomplete implementation of probing for working local exectuables.
Currently we always download and use a private ABCL unzip of binary
archives to the XDG user space allocated to such persistence.

All tests succeed under macOS/Windows.

Location:
trunk/abcl/contrib/abcl-build/build
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-build/build/abcl-build.lisp

    r15009 r15022  
    44  (warn "Unimplemented"))
    55
    6 (defun build-abcl (&key force
    7                         (batch t)
    8                         compile-system
    9                         jar
    10                         clean
    11                      full)
    12   (warn "Unimplemented"))
     6(defun build-abcl (&key
     7                     force ;; DEPRECATED: not sure of meaning in new underlying API
     8                     (batch t) ;; DEPRECATED: lack of meaning
     9                     compile-system ;; DEPRECATED: COMPILE-SYSTEM is always invoked
     10                     jar ;; DEPRECATED: a jar archive is always built
     11                     clean
     12                     full) ;; DEPRECATED:  a full build is always performed
     13  (unless (ignore-errors (asdf:find-system :abcl))
     14    (return-from build-abcl
     15      nil))
     16  (let ((targets '("abcl")))
     17    (when clean
     18      (push "abcl.clean" targets))
     19    (ant/call (asdf:system-relative-pathname :abcl "build.xml")
     20              (nreverse targets))))
    1321
    1422
    1523
     24
  • trunk/abcl/contrib/abcl-build/build/ant.lisp

    r15016 r15022  
    1212
    1313(defun xdg/ant-executable ()
     14  (xdg/executable (ant-zip-uri) "bin/ant"))
     15
     16#+(or)
     17(defun xdg/ant-executable ()
    1418  (let* ((uri (ant-zip-uri))
    1519         (directory (xdg/abcl-install-root uri))
     
    1721                          (subseq name 0 (- (length name) (length "-bin")))))
    1822         (ant-home (merge-pathnames (make-pathname :directory `(:relative ,ant-root-name))
    19                                     directory)))
     23                                    directory))
     24         (ant (merge-pathnames #p"bin/ant" ant-home))
     25         result)
     26    (dolist (p (possible-executable-names ant))
     27      (when (probe-file p)
     28        (return-from xdg/ant-executable
     29          (values
     30           (probe-file p)
     31           ant))))
     32    ;; failure
    2033    (values
    21      (probe-file
    22       (localize-executable-name
    23        (merge-pathnames #p"bin/ant" ant-home)))
    24      ant-home)))
     34     nil
     35     ant)))
    2536
    2637(defun ant/install ()
  • trunk/abcl/contrib/abcl-build/build/install.lisp

    r15009 r15022  
    3232         (download uri))
    3333        (root
    34          (xdg/abcl-download-root :for-uri uri)))
     34         (xdg/abcl-install-root uri)))
    3535    (ensure-directories-exist root)
    3636    (sys:unzip archive root)
     
    5252  destination)
    5353
     54(defun xdg/executable (uri relative-path)
     55  (let* ((directory (xdg/abcl-install-root uri))
     56         (root (let ((name (pathname-name uri)))
     57                 (subseq name 0 (- (length name) (length "-bin")))))
     58         (home (merge-pathnames (make-pathname :directory `(:relative ,root))
     59                                    directory))
     60         (path (merge-pathnames relative-path home)))
     61    (dolist (p (possible-executable-names path))
     62      (when (probe-file p)
     63        (return-from xdg/executable
     64          (values
     65           (probe-file p)
     66           path))))
     67    ;; failure
     68    (values
     69     nil
     70     path)))
     71
     72
     73 
     74
    5475 
    5576
  • trunk/abcl/contrib/abcl-build/build/maven.lisp

    r15009 r15022  
    55
    66(defun xdg/mvn-executable ()
    7   (probe-file
    8    (localize-executable-name
    9     (merge-pathnames "bin/mvn"
    10                      (xdg/abcl-install-root (maven-zip-uri))))))
     7  (xdg/executable (maven-zip-uri) "bin/mvn"))
    118
    129(defparameter *maven-install-root* nil)
  • trunk/abcl/contrib/abcl-build/build/t/abcl-build.lisp

    r15021 r15022  
    88       (abcl-build:build-abcl)
    99       "Testing BUILD-ABCL
")
    10       (prove:diag )
    1110      (prove:ok
    1211       (abcl-build:make-dist (format nil "test-" (random (expt 2 32))))
  • trunk/abcl/contrib/abcl-build/build/t/ant.lisp

    r15016 r15022  
    22
    33(prove:plan 1)
    4 (prove:diag "Testing private installation of Ant
")
    5 (prove:ok (build-abcl:ant/install))
     4(prove:ok
     5 (build-abcl:ant/install)
     6 "Testing ABCL-specific Ant installation of Ant into XDG hierarchy
")
    67
    78(if (not (ignore-errors (asdf:find-system :abcl)))
  • trunk/abcl/contrib/abcl-build/build/t/maven.lisp

    r15021 r15022  
    22
    33(prove:plan 1)
    4 (prove:diag "Testing private installation of Maven
")
    54(prove:ok
    6  (abcl/build:mvn/install))
     5 (abcl/build:mvn/install)
     6 "Testing ABCL-specific Ant installation of Maven into XDG hierarchy
")
    77
    88(if (not (ignore-errors (asdf:find-system :abcl)))
  • trunk/abcl/contrib/abcl-build/build/t/util.lisp

    r15021 r15022  
    11(in-package :abcl/build/t)
    22
    3 (let ((possible-executables
    4        (abcl/build:possible-executable-names "java")))
    5   (prove:plan 1)
    6   (prove:is-type possible-executables
    7                  'cons))
     3(prove:plan 1)
     4(prove:is-type (abcl/build:possible-executable-names "java")
     5               'cons)
    86
    97(prove:plan 1)
    108(prove:is (length (abcl/build:split-string "one.two.three." #\.))
    11           3)
     9          4)
    1210
    1311(prove:finalize)
Note: See TracChangeset for help on using the changeset viewer.