Re: Learning and using aap in website project

Bram Moolenaar <[email protected]> Tue, 29 Jun 2004 20:33:03 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Fredrik wrote:

> When following your instructions I get the following message:
> $ aap
> Aap: Do not know how to build "../html/index.asc"

[...]

> Aap: Entering directory `/home/stone/new-site/source'
> Aap: 3 - updating target "../html/index.html"
> Aap: 4 - Using build rule "%.html : %.asc conf/asciidoc.conf" for target
> "../html/index.html"
> Aap: 5 - updating target "../html/index.asc"
> Aap: 5 - Do not know how to build "../html/index.asc"

[...]

> # File translation rules.
> :rule %.html : %.asc conf/asciidoc.conf
>   @if target == 'index.html':
>     # Index has description and keywords meta tags.
>     ASCIIDOC_OPTS += -g index-only -o $target
>   :sys $ASCIIDOC $ASCIIDOC_OPTS -o $target $(source[0])
> 
> 
> I'm not shure what I'm missing.

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

-- 
DENNIS:  Listen -- strange women lying in ponds distributing swords is no
         basis for a system of government.  Supreme executive power derives
         from a mandate from the masses, not from some farcical aquatic
         ceremony.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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 sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com