Re: AAP static libraries tools
Bram Moolenaar <[email protected]> Mon, 05 Apr 2004 18:50:45 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Fred Schoenahl wrote:
> > Aap has the same intention: always use forward slashes in file names.
>
> In fact I saw this in the TODO list just after posting, sorry...
>
> > But for MS-Windows system commands often backslashes have to be used.
> > This should be handled where the system command is invoked.
> > I'm afraid we don't have a simple method for this yet. You would have
> > to use a Python function to replace slashes with backslashes.
> >
> > There are two possible ways to make this simple:
> > 1. Use a function. Example:
> > :sys compile `backslash(source)` > `backslash(target)`
> > 2. Use a special character after the $. Example:
> > :sys compile $/source > $/target
> > Unfortunately, the more obvious $\var is already being used for
> > escaping special characters.
>
> may I add
>
> 3. Allow both (transfer problems to developers ;))
> 4. Use | (bar) unless already used like :
> :sys compile src|source.c
>
> I would love the src|subproject|main.c, but as I see you use
> OR-similar rules for "oneof", it may be problematic to make |
> (conventional OR) reserved for the future
The | is already used to concatenate commands through pipes. I would
not want to break this.
Since the ":sys" command is already system-dependent, it is the person
that writes the ":sys" command that should take care of differences
between systems. This can get complicated, e.g., when using Cygwin
commands on MS-Windows. Doing this automatically still requires that
the actual system command is executed at the lowest level.
I think using / for path separator is the most natural, because it works
nearly everywhere. MS-Windows command lines are the exception, and even
then several commands do accept forward slashes.
> > I have thought about
> > expanding it, but didn't find time to actually work on it.
>
> The project isn't to its end, if I can, I ll check what I can do... have
> to learn advanced python first !
Learning Python is quite easy. It is one of the simplest languages that
I know, even though it is very powerful. So long as you don't try
writing modules in C...
> > Ultimately
> > it would become a complete autoconf replacement. But let's first try
> > adding the most useful stuff. What would you need now?
>
> Oh I'll just propose that :
>
> - Binding to pkg-config in two ways : smtg like
> :conf config: mytool
> which tests e.g. the existence and output of
> mytool-config --version
> or
> pkgconfig --version mytool
Thus invoking an external command and turning the output into something
useful. This does require finding examples of how this is done with
autoconf and the best way to do this with Aap. Both generic and
offering the details one would need. E.g., when testing for GTK
libraries, not only if they are present but also what compiler and
linker arguments need to be used.
> and another useful tool would be a parser like SCons ParseConfig() that
> works like
>
> parseconfig(`mytool-config --libs --flags`)
> and sets LIBS, INCLUDE and other flags as required.
>
> Maybe combine both?
This sounds like a high level command to do the test for a known
package, and a generic lower level command that can be used for packages
not supported yet.
> I'll see what I can do, have some experience with python, but not on
> system related computing ... so have to explore how aap is done first...
Suggestions for improving Aap are welcome. Patches even more! :-)
--
A KNIGHT rides into shot and hacks him to the ground. He rides off.
We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. & A.
twin-set emerges from the trees and looks in horror at the body of her
HUSBAND.
MRS HISTORIAN: FRANK!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click