Ignore:
Timestamp:
Sep 26, 2007, 2:53:18 AM (13 years ago)
Author:
gb
Message:

Merge version-tracking changes from trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0709/ccl/lib/compile-ccl.lisp

    r6927 r7294  
    536536                                                 
    537537               
     538(defun create-interfaces (dirname &key target populate-arg)
     539  (let* ((backend (if target (find-backend target) *target-backend*))
     540         (*default-pathname-defaults* nil)
     541         (ftd (backend-target-foreign-type-data backend))
     542         (d (use-interface-dir dirname ftd))
     543         (populate (merge-pathnames "C/populate.sh"
     544                                    (merge-pathnames
     545                                     (interface-dir-subdir d)
     546                                     (ftd-interface-db-directory ftd))))
     547         (cdir (make-pathname :directory (pathname-directory (translate-logical-pathname populate))))
     548         (args (list "-c"
     549                     (format nil "cd ~a && /bin/sh ~a ~@[~a~]"
     550                             (native-translated-namestring cdir)
     551                             (native-translated-namestring populate)
     552                             populate-arg))))
     553    (format t "~&;[Running interface translator via ~s to produce .ffi file(s) from headers]~&" populate)
     554    (force-output t)
     555    (multiple-value-bind (status exit-code)
     556        (external-process-status
     557         (run-program "/bin/sh" args :output t))
     558      (if (and (eq status :exited)
     559               (eql exit-code 0))
     560        (let* ((f 'parse-standard-ffi-files))
     561          (require "PARSE-FFI")
     562          (format t "~%~%;[Parsing .ffi files; may create new .cdb files for ~s]" dirname)
     563          (funcall f dirname target)
     564          (format t "~%~%;[Parsing .ffi files again to resolve forward-referenced constants]")
     565          (funcall f dirname target))))))
Note: See TracChangeset for help on using the changeset viewer.