Re: :action depend for D

"Lars Ivar Igesund" <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <064c01c39f84$ef267400$0200000a@mesmer>
----- Original Message ----- 
From: "Bram Moolenaar" <[email protected]>
> 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.

I have a good and stable place. It will be natural to have it there
for others anyway. It is now situated at
http://www.igesund.net/larsivar/ddepcheck.d

>
> 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.

As you see, I've changed it to ddepcheck

>
> 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.

No I didn't test it :)

>
> Compiling depchekd.d is done by directly invoking "dmd".  This bypasses
> the carefully tuned "d" module and "dmd" tool.

Yes I'm aware. As long as dmd is the only compiler, it's not really a
problem.
It has to be installed anyway (maybe using ":assertpkg {optional}" first).

> I guess your method to invoke "dmd" directly wasn't such a bad idea.

It wasn't ;)

> How about this then:

>         :sys $dc depchkd.d
I think we will optimize:
           :sys $dc -O ddepcheck.d
>
> I have uploaded this, thus you can try it out with "aap --install
> depchkd".

Ok, the fetching and installing works as a charm. The problem though
with it being installed in bindir, is that :sys don't find at since that dir
isn't in PATH. :assertpkg do, though. Some possible solutions.

1. Have the boot.aap install it somewhere that we *knows* is in PATH.
   (I don't like this solution).

2. Instruct the user to add bindir to PATH.
   (Not automatic enough?)

3. Add bindir to PATH automatically at some time.
   (Shell (atleast cmd.exe) must be restarted before it works)

4. Let :sys check bindir too.
    (A possibly ugly solution?)

5. Let the user provide a directory during install.
    (It is then up to the user to make sure the dir is in PATH)

Lars Ivar Igesund



-------------------------------------------------------
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/
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.