Bram Moolenaar | 1 Jul 2004 12:14
Picon

Re: Learning and using aap in website project


Fredrik wrote:

> > It's not so obvious.  Aap finds the rule to turn a .asc file into a
> > .html file, but a rule does not specify where to search for the source
> > file.  It simply uses the name of the file with the path for the %.
> > 
> > The most explicit solution is to adjust the rule to include the path:
> > 
> >     :rule ../html/%.html : %.asc conf/asciidoc.conf
> >         ...
> 
> Thanx! That solved it!
> 
> I still cannot figure out how to solve the "articles" part (subdir).
> 
> In the "source" dir I have another dir called "articles" where I put submitted
> articles also written in AsciiDoc but in this dir the conf/asciidoc.conf is
> diffrent than in the the source dir so I can't have these files in the
> "source" dir. I have tried a lot of combinations with ":child
> source/articles/main.aap" and changed the "ROOT" variable in the filelist to
> "ARTICLES" but I get an message about that source/articles/main.aap doesent
> know how to build "about.asc" which is a file in "source" not in "articles".
> Even after I have changed the the "HTML_FILES" variable to "ARTICLES" wich is
> a variable in the "filelist.aap".  ( I hope you understand what I mean).
> 
> Here is an exact description of what I want to do :)
> 
> /
> /source/
(Continue reading)

Rainer Michael Schmid | 6 Jul 2004 15:50

New to aap: misc. problems

Hi,

I was looking for some time for a nice build tool -- I never got jam 
working properly, ant looks IMO awful and I ended using cmake. But then 
I found aap and from the documentation it looks great and I want to 
start using it.

However, when I did my first experiments with aap I ran into a lot of 
problems and I start wondering if they are only beginner's problem or 
if aap is not as stable yet.

I use aap 1.065 on a Mac running Panther. Here are some problems I 
encountered:

- Building a static library with :lib worked fine for a project with 
pure C files (ar is run and the library works fine). However, I am 
struggling to get the same thing work for a C++ project: when I first 
try to build it, the object files are compiled just fine. But when it 
comes to building the library it tries to do this with g++ and it 
fails. If I start aap again, no source files need to be compiled and it 
tries to build the library with ar and it succeeds. Haven't found a way 
to tell aap to do it right the first time.

- I tried to build a C++ program and aap tried to link it with gcc 
instead of g++. I had to add a {var_LD=$CXX} option to the :program 
rule.

- The add_LIBS option passes the arguments (as it seems) directly. This 
in my case nice, since I need to specify not only "normal" libraries 
(with the -l flag), but also some frameworks to link against (done with 
(Continue reading)

Adriaan de Groot | 6 Jul 2004 16:17
Picon
Picon

Re: New to aap: misc. problems

On Tue, 6 Jul 2004, Rainer Michael Schmid wrote:
> - The add_LIBS option passes the arguments (as it seems) directly. This

Aap is still evolving, don't forget that. It's not been used on every
possible platform yet.

> the -framework flag). But I wonder why the design decision was to
> specify libraries via -l and not in an abstract manner.

Probably because then ther would need to be some (platform x compiler)
-specific way to convert the list of desired libraries to something
suitable for the linker being used.

> - I took a look at the source code of the Qt module and it seems that a
> lot of special things are hardcoded (I haven't tried it yet, but that
> will come soon). E.g. the default for the directory of the Qt
> installation is /usr/local/qt-3.2 (i.e. even ther version is hardcoded

The Qt stuff is mine, and since there is _no_ standard place to look for
Qt (well, I could have chosen /usr/X11R6), this is what you get. Patches
are welcome, of course (to this list) with an exhaustive search of all the
possible default places it could be.

> -- I believe one could try a bit harder to find the right Qt
> installation). The generated .cpp file from a .ui file is modified in a
> strange way (some KDE stuff is done, so you probably can't use it for a
> Qt only project).

That's true - since I wrote the Qt stuff to support the KDE module that
never materialized, and in KDE you munge the moc a bit.
(Continue reading)

Rainer Michael Schmid | 6 Jul 2004 17:30

Re: New to aap: misc. problems

>> - The add_LIBS option passes the arguments (as it seems) directly. 
>> This
>
> Aap is still evolving, don't forget that. It's not been used on every
> possible platform yet.

Ok, that was one of the things I wanted to know. On the website it was 
not clear what the status is.

>> - I took a look at the source code of the Qt module and it seems that 
>> a
>> lot of special things are hardcoded (I haven't tried it yet, but that
>> will come soon). E.g. the default for the directory of the Qt
>> installation is /usr/local/qt-3.2 (i.e. even ther version is hardcoded
>
> The Qt stuff is mine, and since there is _no_ standard place to look 
> for
> Qt (well, I could have chosen /usr/X11R6), this is what you get. 
> Patches
> are welcome, of course (to this list) with an exhaustive search of all 
> the
> possible default places it could be.

That is true. But it might be that the moc and uic tools are already in 
the path and that the headers are in a standard-include, e.g.

As I said, I haven't used the Qt module yet. But I will send patches if 
I start using it (and I will probably start using it soon).

>> The handling of the moc is also done in a
(Continue reading)

Bram Moolenaar | 6 Jul 2004 20:49
Picon

Re: New to aap: misc. problems


Rainer Michael Schmid wrote:

> I use aap 1.065 on a Mac running Panther. Here are some problems I 
> encountered:
> 
> - Building a static library with :lib worked fine for a project with 
> pure C files (ar is run and the library works fine). However, I am 
> struggling to get the same thing work for a C++ project: when I first 
> try to build it, the object files are compiled just fine. But when it 
> comes to building the library it tries to do this with g++ and it 
> fails. If I start aap again, no source files need to be compiled and it 
> tries to build the library with ar and it succeeds. Haven't found a way 
> to tell aap to do it right the first time.

Why does building with g++ fail?  Or is it just the creation of the
static library that fails?  On most system it's required to use a
different linker for C++.  That "ar" is used when no compiling is done
is actually a small bug, fixed in a later version.

It appears there is a conflict between using a different build action
for making a program, and using a different build action for making a
static library.  A simple solution would be to ignore "buildaction" when
making a library.  This means that object files from C and C++ sources
are handled in the same way.  If this needs to be different we could add
a "libaction" attribute to the object files.

> - I tried to build a C++ program and aap tried to link it with gcc 
> instead of g++. I had to add a {var_LD=$CXX} option to the :program 
> rule.
(Continue reading)

Bram Moolenaar | 6 Jul 2004 20:49
Picon

Re: New to aap: misc. problems


Adriaan de Groot wrote:

> > - I took a look at the source code of the Qt module and it seems that a
> > lot of special things are hardcoded (I haven't tried it yet, but that
> > will come soon). E.g. the default for the directory of the Qt
> > installation is /usr/local/qt-3.2 (i.e. even ther version is hardcoded
> 
> The Qt stuff is mine, and since there is _no_ standard place to look for
> Qt (well, I could have chosen /usr/X11R6), this is what you get. Patches
> are welcome, of course (to this list) with an exhaustive search of all the
> possible default places it could be.

There appears to be no standard way to find the Qt stuff.  What I use in
the Vim configure script now (for KDE Vim) is to find the "moc" program
and remove "/bin/moc" from the full path.  If "moc" is in $PATH this
should work.

--

-- 
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
		[real standing law in Massachusetts, United States of America]

 /// Bram Moolenaar -- Bram@... -- 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 sponsored by Black Hat Briefings & Training.
(Continue reading)

Rainer Michael Schmid | 6 Jul 2004 22:56

Re: New to aap: misc. problems

>> - Building a static library with :lib worked fine for a project with
>> pure C files (ar is run and the library works fine). However, I am
>> struggling to get the same thing work for a C++ project: when I first
>> try to build it, the object files are compiled just fine. But when it
>> comes to building the library it tries to do this with g++ and it
>> fails. If I start aap again, no source files need to be compiled and 
>> it
>> tries to build the library with ar and it succeeds. Haven't found a 
>> way
>> to tell aap to do it right the first time.
>
> Why does building with g++ fail?  Or is it just the creation of the
> static library that fails?

It is only the creation of the library that fails.

> On most system it's required to use a
> different linker for C++.  That "ar" is used when no compiling is done
> is actually a small bug, fixed in a later version.

I am not sure if different tools are used for building a static C and a 
static C++ library. For the linker, I agree, but for the library? After 
all, the C++ symbols should be name mangled... on the Mac (and I 
believe on Linux as well), ar and ranlib are used to build a static C++ 
library.

aap seems to use the $LD program to build the static library. I tried 
to play around by setting the variables, but the main problem by doing 
this is that aap adds a "-o libmylib.a" for the command (and ar has no 
-o option). I don't know how to get around this.
(Continue reading)

Luc Hermitte | 7 Jul 2004 03:08
Picon
Favicon

[AAP] list of updated sources

Hello,

I'm trying to get the list of the files that have been modified since
the last execution of aap.

So far, I've used the trick "Copying All Files At Once" (in
user-publish.html). However I do not just want to copy the files on my
web site but first convert them in a _single_ action.

The trick with "finally" does not seems really appropriated as it happens
at the very end of the execution of A-A-P.
In there another way to build the list of updated files ?

Just in case I missed something, here are my aap files:

---< main.aap >---
    [...]
    UpdatedConfFiles =
    :child findinmailrc.aap
    :print Main: $UpdatedConfFiles # always prints "Main: " 
    [...]
    SITEFiles += UpdatedConfFiles
    :attr {publish = ftp://..../mutt/%file%} $SITEFiles

---< findinmailrc.aap>---
    ConfFilesOrig =
	    mailrc/muttrc*
	    mailrc/mailcap

    Res = 
(Continue reading)

Bram Moolenaar | 7 Jul 2004 11:13
Picon

Re: New to aap: misc. problems


Rainer Michael Schmid wrote:

> I am not sure if different tools are used for building a static C and a 
> static C++ library. For the linker, I agree, but for the library? After 
> all, the C++ symbols should be name mangled... on the Mac (and I 
> believe on Linux as well), ar and ranlib are used to build a static C++ 
> library.
> 
> aap seems to use the $LD program to build the static library. I tried 
> to play around by setting the variables, but the main problem by doing 
> this is that aap adds a "-o libmylib.a" for the command (and ar has no 
> -o option). I don't know how to get around this.

OK, thus when compiling C++ for a static library this does not mean the
library has to be build in a different way.  I think we can solve this
by not using the buildaction attribute in the buildlib action.  I'll
rename it to the buildlibaction attribute.  By default it's not set,
it's just for consistency.

> I downloaded the latest version (last week) that was released. So it 
> might be that the fix is not yet in a release. Maybe I will give the 
> CVS version a try later.

I now checked the version log, and this problem was solved in version
1.061.  Perhaps the solution doesn't work for you?  It relies on using
the rule in the default.aap recipe.  Thus if you define your own rule
for compiling it won't work.

> Just a note when it comes to implementing it: on Mac, some libraries 
(Continue reading)

Bram Moolenaar | 7 Jul 2004 11:13
Picon

Re: [AAP] list of updated sources


Luc Hermitte wrote:

> I'm trying to get the list of the files that have been modified since
> the last execution of aap.
> 
> So far, I've used the trick "Copying All Files At Once" (in
> user-publish.html). However I do not just want to copy the files on my
> web site but first convert them in a _single_ action.

For what reason can't you do the conversion in the "finally" commands?

> The trick with "finally" does not seems really appropriated as it happens
> at the very end of the execution of A-A-P.
> In there another way to build the list of updated files ?

Not directly.  But perhaps you can use a trick: From inside the recipe
invoke Aap to echo the list of outdated files.  Then use this list to do
what you want to do.

To echo the list make another recipe in which the rule only echoes the
name of the source file.  Use :syseval to catch the output of "aap -f
receip", then filter out any parts you don't want.

I'm not sure if you want to make it so complicated though.

> PS: Two days ago I tried to post this message directly via gmane. It
> seems the message never reached the list. I hope, now I'm subscribed,
> that it won't appear twice.

(Continue reading)


Gmane