Re: [PATCH] use ASDF functions instead of `logical-pathname-translations'

Luigi Panzeri <[email protected]> Mon, 31 Dec 2007 03:16:56 +0100
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
--=-=-=

Luca Capello <[email protected]> writes:

>
> To remove the need to specify a `logical-pathname-translations', I
> develop the attached patch which uses ASDF functions instead, since clg
> already depends on ASDF.
>

I think that the same results can be achieved with a less invasive
patch. You just need to setup pathname translation in clg-tools.asd
before doing anything, like in the patch attached.



--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=patch-asdf.patch

Index: tools/clg-tools.asd
===================================================================
RCS file: /cvsroot/clg/clg/tools/clg-tools.asd,v
retrieving revision 1.7
diff -u -r1.7 clg-tools.asd
--- tools/clg-tools.asd	6 Jul 2007 10:46:48 -0000	1.7
+++ tools/clg-tools.asd	31 Dec 2007 02:11:51 -0000
@@ -16,3 +16,17 @@
 	       (:file "utils")
 	       (:file "config" :depends-on ("utils"))
 	       (:file "asdf-extensions" :depends-on ("utils"))))
+
+(defmethod asdf:perform :before ((op asdf:compile-op) (component (eql (asdf:find-system "clg-tools"))))
+  (setf
+   (logical-pathname-translations "clg")
+   `(("**;*.*.*" ,(make-pathname 
+		   :directory (append (butlast (pathname-directory (asdf:component-pathname component)))
+				      (list :wild-inferiors)))))))
+
+(defmethod asdf:perform :before ((op asdf:load-op) (component (eql (asdf:find-system "clg-tools"))))
+  (setf
+   (logical-pathname-translations "clg")
+   `(("**;*.*.*" ,(make-pathname 
+		   :directory (append (butlast (pathname-directory (asdf:component-pathname component)))
+				      (list :wild-inferiors)))))))
\ No newline at end of file

--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Clg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clg-devel

--=-=-=--