Re: :action depend for D

"Lars Ivar Igesund" <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <028301c3a37f$caee3a10$0200000a@mesmer>
----- Original Message ----- 
From: "Bram Moolenaar" <[email protected]>

> I'm sometimes using my notebook on a plane...

Well, they should get internet in the planes then :)

> Making a Python implementation would be a lot more work, and its speed
> would be disappointing.  So let's forget about that.

Good.

> Including ddepcheck.d with Aap sounds like a good solution.  Even better
> would be if the D compiler would be able to do this by itself, like gcc
> does.  But that's not in our hands.

Well, at the moment, there is only one man working on a/(the) compiler,
making such features very low priority. He can bundle my ddepcheck, if
he want to, though.

>
> Please look at the current version in CVS and suggest how ddepcheck.d
> can be added and compiled when necessary.  I think it needs to go into
> the "tools" directory.

Ok, attached is the newest version of ddepcheck to be put into the tools
dir.
Also attached is the patch for d.aap that builds ddepcheck in case it
couldn't
be downloaded. Possibly it looks a bit hairy, but it works.

Also, for the bootscript, could you add the files
ddepcheck$OBJSUF and ddepcheck.map to the files to be deleted
afterwards? (see the d.aap patch for what I mean.)

Well, it's getting there :)

Lars Ivar Igesund
ddepcheck.d (application/octet-stream, 10.3 KB) - not displayed
d.diff (application/octet-stream, 1.4 KB)
Index: d.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/d.aap,v
retrieving revision 1.8
diff -u -r1.8 d.aap
--- d.aap	3 Nov 2003 18:54:21 -0000	1.8
+++ d.aap	5 Nov 2003 09:20:15 -0000
@@ -28,18 +28,29 @@
 # (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
+
+@if not _top.DDEPCHECK:
+    bindir = "`Global.aap_bindir`"
+    toolsdir = "`Global.aap_toolsdir`"
+    :print $toolsdir
+    :mkdir {force} $bindir
+    :print ddepcheck not found, building from local source
+    :progsearch dc dmd
+    :sys $dc -O -of$bindir`os.sep`ddepcheck$EXESUF $toolsdir`os.sep`ddepcheck.d
+    :print ddepcheck built and installed
+    :del {q} ddepcheck$OBJSUF ddepcheck.map 
+    :progsearch _top.DDEPCHECK ddepcheck
+
 # (5) Actions, Rules and Routes
 
 # :do depend
 #
-:progsearch _top.DDEPCHECK ddepcheck
-
-@if not _top.DDEPCHECK:
-    :print WARNING: ddepcheck not found, no dependency checking for D files.
-@else:
-    :action depend {recursive} 
-	    {buildcheck = $DMD $?DFLAGS $?DVERSION $?DDEBUG $?DIMPORT } d
-	:sys $_top.DDEPCHECK -m $?DIMPORT $source > $target
+    
+:action depend {recursive} 
+        {buildcheck = $DMD $?DFLAGS $?DVERSION $?DDEBUG $?DIMPORT } d
+    :sys $_top.DDEPCHECK -m $?DIMPORT $source > $target
 
 # :do compile
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.