[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

So how *DO* I use distribution tapes instead of carry tapes?



    Date: Mon, 26 Oct 87 12:32 EST
    From: Jeffrey Mark Siskind <Qobi@ZERMATT.LCS.MIT.EDU>

	Date: Mon, 26 Oct 87 11:41 EST
	From: Scott McKay <SWM@SAPSUCKER.SCRC.Symbolics.COM>

	In 7.2, 1dis:defpseudo-system0 is known as 1sct:define-distribution-system0.
	It looks just like a normal unjournalled 1defsystem0, except that you get
	to use wildcards.

    When is 7.2 going to be released and what can I do in the meantime? - Jeff

7.2 is slated for release in the late spring.  In the meantime, you are
screwed, unless something like this code works for you.  I think that in
7.1, 1collect-input-and-outputs0 maight not be a generic function, so you
may have to massage that somewhat.

Also, due to resource constraints, the state of Distribution itself in
7.0 and 7.1 is very poor, so you may yet have troubles using it.  In
7.2, we have made a concerted effort to produce a usable Distribution
user-interface, and have greatly improved the SCT substrate for it.

(defflavor distribution-system
	((default-module-type :distribution)
	 (patchable nil)		;distribution-systems are never compiled
	 (maintain-journals nil)
	 (advertised-in nil)
	 (initial-status nil))
	(system)
  (:conc-name system-)
  :writable-instance-variables)

(defmethod (:init distribution-system :after) (init-plist)
  (when (member :default-module-type (location-contents init-plist))
    ;;--- It would sure be nice if this worked!
    (ferror "You can't supply a default module-type in distribution-systems")))

(defprop define-distribution-system "Distribution system" si:definition-type-name)
(defmacro define-distribution-system (system-name options &body body)
  (declare (zwei:indentation 1 3 2 1))
  (when (memq :name options)
    (ferror "You may not explicitly specify :NAME in a DEFINE-DISTRIBUTION-SYSTEM form"))
  (let ((system-name (canonicalize-system-name system-name)))
    `(progn
       (record-source-file-name ',system-name 'defsystem)
       (define-system-internal  ',system-name 'distribution-system ',options
				',(expand-short-form body)))))


;; Compiling and loading are no-ops for :DISTRIBUTION modules
(define-module-type :distribution nil nil
  no-load-or-compile-module)

;; Return the list of pathnames with wildcards resolved
(defmethod (collect-inputs-and-outputs distribution-module) (&optional merge-version
							     &key vc-branch)
  (declare (values module-inputs module-outputs))
  (ignore merge-version)
  (loop for (input-pattern) in inputs
	append
	  (loop for (input) in (if (or (let ((name (send input-pattern :name)))
					 (or (eq name :wild)
					     (string-search-char #/* name)))
				       (eq (send input-pattern :type) :wild))
				   (cdr (fs:directory-list input-pattern :fast))
				 (list (list input-pattern)))
		as input-file = (let* ((vcb (or (send input :vc-branch) vc-branch))
				       (physical (send input :new-pathname
							     :vc-branch vcb
							     :vc-version (and vcb :newest))))
				  ;; Always try to use logical pathnames, please
				  (send input-pattern :back-translated-pathname physical))
		collect input-file) into all-inputs
	finally (return (values all-inputs all-inputs))))

(defmethod (version-control-defaults distribution-module) (system)
  (declare (values (version-controlled branch-mapping)))
  (ignore system)
  (values nil nil))

(defmethod (distribution-defaults distribution-module) (system)
  (declare (values distribute-sources distribute-binaries source-category))
  (values (system-distribute-sources system)
	  (system-distribute-binaries system)
	  (system-source-category system)))

(defmethod (module-special-source-category distribution-module) (pathname)
  (ignore pathname)
  :basic)