Couple of fixes

Lars Ivar Igesund <[email protected]> Sat, 22 Jan 2005 21:53:09 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Hi!

I've attached two patches. The first removes the ":assertpkg ddepcheck". 
I don't see the point as long as the source is included in the A-A-P 
distribution. In addition it is impractical for me to update boot.aap 
for ddepcheck. I've also made some minor 'fixes' to the ddepcheck 
installation routine. The second is a linux compile fix for ddepcheck.

Lars Ivar Igesund
d.diff (text/plain, 2.5 KB)
Index: d.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/d.aap,v
retrieving revision 1.17
diff -u -r1.17 d.aap
--- d.aap	23 Oct 2004 11:39:17 -0000	1.17
+++ d.aap	22 Jan 2005 20:38:39 -0000
@@ -1,11 +1,11 @@
 # Part of the A-A-P recipe executive: Module for the D Programming Language.
 
-# Copyright (c) 2002 - 2004 Lars Ivar Igesund and stichting NLnet Labs
+# Copyright (c) 2002 - 2005 Lars Ivar Igesund and stichting NLnet Labs
 # Permission to copy and use this file is specified in the file COPYING.
 # If this file is missing you can find it here: http://www.a-a-p.org/COPYING
 #
 
-# Last Change: 2004 Aug 30
+# Last Change: 2005 Jan 22
 
 # See also dmd.py in the tools directory for compiler specific info.
 
@@ -26,9 +26,6 @@
 # The first one found sets $D_COMPILE_ACTION and friends.
 :toolsearch dmd
 
-# (4.5) Check for dependency checker. If not present, download it.
-:assertpkg ddepcheck {optional}
-
 # If not downloaded, build it from local copy.
 :progsearch _top.DDEPCHECK ddepcheck
 
@@ -51,12 +48,12 @@
             :print q. Quit
             @r = raw_input("Select an option: ")
             @if r == '1':
-                :asroot $dc -O -of$bindir`os.sep`ddepcheck$EXESUF 
+                :asroot $dc -O -release -of$bindir`os.sep`ddepcheck$EXESUF 
                             $toolsdir`os.sep`ddepcheck.d
             @elif r == '2':
                 :print The path entered must be writable from your user.
                 @bindir = raw_input("Enter install path for ddepcheck ")
-                :sys $dc -O -of$bindir`os.sep`ddepcheck$EXESUF 
+                :sys $dc -O -release -of$bindir`os.sep`ddepcheck$EXESUF 
                         $toolsdir`os.sep`ddepcheck.d
                 :print NOTE: It might be necessary to add $bindir to your PATH 
                         before the next execution of Aap.
@@ -64,13 +61,14 @@
             @elif r == 'q':
                 :quit
     @else:
-        :sys $dc -O -of$bindir`os.sep`ddepcheck$EXESUF 
+        :sys $dc -O -release -of$bindir`os.sep`ddepcheck$EXESUF 
                 $toolsdir`os.sep`ddepcheck.d
     :del {q} ddepcheck$OBJSUF ddepcheck.map 
     @if not _top.DDEPCHECK:
         :progsearch _top.DDEPCHECK ddepcheck
     @if not _top.DDEPCHECK:
-        :error Building ddepcheck failed or the program cannot be found.
+        _top.DDEPCHECK ?=
+        :print Building ddepcheck failed or the program cannot be found.
 
 # (5) Actions, Rules and Routes
ddepcheck.diff (text/plain, 1.3 KB)
Index: ddepcheck.d
===================================================================
RCS file: /cvsroot/a-a-p/Exec/tools/ddepcheck.d,v
retrieving revision 1.6
diff -u -r1.6 ddepcheck.d
--- ddepcheck.d	23 Oct 2004 11:38:00 -0000	1.6
+++ ddepcheck.d	22 Jan 2005 20:39:10 -0000
@@ -1,10 +1,10 @@
 /*
  * ddepcheck.d
- * Version 1.0.1
- * Last modified 24th of August 2004
+ * Version 1.0.2
+ * Last modified 22nd of January 2005
  *
  * Dependency walker for D source files.
- * Copyright 2003-2004 Lars Ivar Igesund <larsivar'at'igesund.net>
+ * Copyright 2003-2005 Lars Ivar Igesund <larsivar'at'igesund.net>
  *
  * Permission to use, copy, modify, distribute and sell this software
  * and its documentation for any purpose is hereby granted without fee,
@@ -168,7 +168,7 @@
   if (!versioncalled) {
     writefln("ddepcheck"); 
     writefln("Dependency walker for D source files.");
-    writefln("Version 1.0.1 Copyright Lars Ivar Igesund 2003 - 2004");
+    writefln("Version 1.0.2 Copyright Lars Ivar Igesund 2003 - 2005");
   }
   versioncalled = true;
 }
@@ -1140,7 +1140,7 @@
 version (Win32) {
   return (GetFileAttributesA(toStringz(file)) != 0xFFFFFFFF);
 }
-version (Linux) {
+else {
   // FIXME: I guess there is a better way to do this. larsivi 18042004
   bit result = true;
   try {