2007-07-18 17:21:52 +04:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# Part of Equinox Desktop Environment (EDE).
|
|
|
|
# Copyright (c) 2000-2007 EDE Authors.
|
|
|
|
#
|
|
|
|
# This program is licensed under terms of the
|
|
|
|
# GNU General Public License version 2 or newer.
|
|
|
|
# See COPYING for details.
|
|
|
|
|
|
|
|
ASCIIDOC = "$(TOP)/docs/asciidoc/asciidoc.py" ;
|
|
|
|
DOCDIR = "$(TOP)/docs" ;
|
|
|
|
MANUALDIR = "$(DOCDIR)/manual" ;
|
|
|
|
|
|
|
|
# Must be relative to "docs" dir
|
2007-07-18 21:32:49 +04:00
|
|
|
MANUALICONS = "images" ;
|
2007-07-18 17:21:52 +04:00
|
|
|
|
2007-07-18 21:32:49 +04:00
|
|
|
# EdeManual [file] : [optinal-images] ;
|
|
|
|
# Creates [file].html via asciidoc. If [optinal-images] are
|
|
|
|
# given, they will be copied in $(DOCICONS).
|
2007-07-18 17:21:52 +04:00
|
|
|
rule EdeManual
|
|
|
|
{
|
|
|
|
if ! $(ASCIIDOC) {
|
|
|
|
Echo "ASCIIDOC not defined; documentation will not be built !" ;
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
|
|
|
|
local html_ext = ".html" ;
|
|
|
|
local path = $(SEARCH_SOURCE) ;
|
|
|
|
|
|
|
|
local i source target ;
|
|
|
|
for i in $(<) {
|
|
|
|
source = [ FFileName $(path) $(i) ] ;
|
|
|
|
# strip directory part so we can prepend
|
|
|
|
# another one (used as output directory)
|
|
|
|
target = $(source:D=) ;
|
|
|
|
|
|
|
|
# set output extension (asciidoc does not do that)
|
|
|
|
# and grist to prevent collision
|
|
|
|
target = $(target:S=$(html_ext):G="$(target)-html") ;
|
|
|
|
|
|
|
|
Depends $(target) : $(source) ;
|
|
|
|
Depends all : $(target) ;
|
|
|
|
Depends doc : $(target) ;
|
|
|
|
|
|
|
|
# set output to $(MANUALDIR) directory
|
|
|
|
MakeLocate $(target) : $(MANUALDIR) ;
|
|
|
|
|
|
|
|
AsciiDoc1 $(target) : $(source) ;
|
|
|
|
Clean clean : $(target) ;
|
|
|
|
}
|
2007-07-18 21:32:49 +04:00
|
|
|
|
|
|
|
# copy images, if given
|
|
|
|
local imgdir = [ FDirName $(MANUALDIR) $(MANUALICONS) ] ;
|
|
|
|
if $(>) {
|
|
|
|
for i in $(>) {
|
|
|
|
source = [ FFileName $(path) $(i) ] ;
|
|
|
|
target = $(source:D=$(imgdir)) ;
|
|
|
|
|
|
|
|
MkDir $(imgdir) ;
|
|
|
|
|
|
|
|
Depends $(target) : $(imgdir) ;
|
|
|
|
Depends $(target) : $(source) ;
|
|
|
|
Depends all : $(target) ;
|
|
|
|
Depends doc : $(target) ;
|
|
|
|
|
|
|
|
Copy $(target) : $(source) ;
|
|
|
|
Clean clean : $(target) ;
|
|
|
|
}
|
|
|
|
}
|
2007-07-18 17:21:52 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
actions AsciiDoc1
|
|
|
|
{
|
2007-07-18 21:32:49 +04:00
|
|
|
$(ASCIIDOC) -a icons -a iconsdir=$(MANUALICONS) -a edeversion="EDE 2.0 alpha 1" -o $(<) $(>)
|
2007-07-18 17:21:52 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
NotFile doc ;
|
|
|
|
Always doc ;
|