Re: Learning and using aap in website project
Fredrik <aap-rLZlch/[email protected]> Wed, 30 Jun 2004 19:42:48 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
On [040629 21:40] Bram Moolenaar <[email protected]> wrote: > > 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 > ... 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/ /source/conf/ /source/atricles /source/articles/conf /html In the source dir the "main" site is located and in the "articles" dir submitted articles are located. In those dirs there is another dir "conf" which contans a asciidoc.conf file which holds the configuration when generating html from the ascidoc files. These need to be diffrent (that's why I need to have a seperate dir for the articles). Going to / and type "aap" would first go to "source" and build all the %.asc files using /source/conf/asciidoc.conf configuration file and then go to "/source/articles" and build all the %.asc files using "/source/articles/conf/asciidoc.conf" configuration and all build files should be palced in the /html dir. *phew* Or am I doing something very wrong here? :) -- .Fredrik ------------------------------------------------------- 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