Re: :action depend for D
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote:
> I have now created a dependency checker for D (in D).
> Attached is a diff for d.aap (adds action depend, and an
> :assertpkg for the dependencychecker). The depend
> action is tested and works on Windows (no reason it
> shouldn't work in Linux, but it isn't tested yet).
Very good to see you made this!
> Also attached is a minor doc change to ref-modules,
> since the DIMPORTS variable is used by the depchecker.
>
> And also attached is the depchkd src and a bootscript
> (I have no idea if it works...) If you don't want to host
> depchkd, I can do that myself. It might offload you from
> needing to update depchkd when it changes (and it will
> change).
If you have an account on sourceforge I can give you permission to
update the files yourself. Just promise you won't touch any of the
other files (my upload script will overwrite them anyway...).
But if you have a good place to host the files yourself, the package
recipe on the A-A-P site can redirect to that.
A few remarks:
I typed the name wrong a few times. The name "depchkd" could be
"depcheckd". Or perhaps "ddepcheck"? It's not that important, but once
it's chosen it's difficult to change without causing trouble.
The bootstrap recipe for the package downloads the source, compiles it
and moves it to the Aap bin directory. It looks like you didn't test
this: There is no "Global.aap_srcdir". You can download the file into
the current directory and build it there.
Compiling depchekd.d is done by directly invoking "dmd". This bypasses
the carefully tuned "d" module and "dmd" tool.
How about doing it very simple:
:import d
bindir = "`Global.aap_bindir`"
:program $bindir/depchkd : depchkd.d {fetch = http://www.a-a-p.org/packages/%file%}
Does that work? Hmm, we have a chicken/egg problem here: The package
recipe includes the "d" module to be able to build the depchkd program,
but the "d" module wants to use the "depchkd" program!
I guess your method to invoke "dmd" directly wasn't such a bad idea.
How about this then:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
bindir = "`Global.aap_bindir`"
:mkdir {force} $bindir
all:
:print This will build depchkd.
:fetch {fetch = http://www.a-a-p.org/packages/%file%} depchkd.d
:progsearch dc dmd
:sys $dc depchkd.d
:del depchkd.d
install:
:print This will install depchkd.
:move {force} depchkd$EXESUF $bindir
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I have uploaded this, thus you can try it out with "aap --install
depchkd".
--
An indication you must be a manager:
You give constructive feedback to your dog.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/