0cb48e2001-08-20Martin Nilsson # # Main makefile for extracting autodoc. #
2fb5dc2006-04-20Henrik Grubbström (Grubba) # $Id: Makefile,v 1.5 2006/04/20 13:26:07 grubba Exp $
0cb48e2001-08-20Martin Nilsson #
3151432001-11-16Martin Nilsson PIKE=pike
2fb5dc2006-04-20Henrik Grubbström (Grubba) REFDOC=/home/grubba/src/Pike/7.7/refdoc
0cb48e2001-08-20Martin Nilsson 
2df4b82004-05-18Henrik Grubbström (Grubba) # FIXME: The REFDOC variable should be generated.
0cb48e2001-08-20Martin Nilsson 
3151432001-11-16Martin Nilsson all: modref
0cb48e2001-08-20Martin Nilsson 
3151432001-11-16Martin Nilsson modref: build/modref.xml rm -rf modref || /bin/true @mkdir modref
2fb5dc2006-04-20Henrik Grubbström (Grubba)  @cp $(REFDOC)/modref/style.css modref/style.css
3151432001-11-16Martin Nilsson  @$(PIKE) $(REFDOC)/presentation/tree-split-autodoc.pike \
2fb5dc2006-04-20Henrik Grubbström (Grubba)  build/modref.xml $(REFDOC)/structure/module_modref.html modref roxen
3151432001-11-16Martin Nilsson  @mkdir modref/images # cp build/images/* modref/images @cp $(REFDOC)/src_images/next.gif $(REFDOC)/src_images/prev.gif modref/images
0cb48e2001-08-20Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) html: html_manual build/manual.xml
3151432001-11-16Martin Nilsson # cp build/images/* html_manual/images/ @$(PIKE) $(REFDOC)/presentation/make_html.pike --img=images/ build/manual.xml
0cb48e2001-08-20Martin Nilsson 
3151432001-11-16Martin Nilsson traditional: traditional_manual build/traditional.xml # cp build/images/* traditional_manual/images/ @$(PIKE) @(REFDOC)/presentation/make_html.pike --img=images/ build/traditional.xml
0cb48e2001-08-20Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) # build/autodoc.xml: recursive_join # @$(MAKE) PIKE="$(PIKE)" XMLFILES="`echo build/*/*.xml`" \ # autodoc.xml
0cb48e2001-08-20Martin Nilsson  recursive_join: extract
e91ddf2001-08-23Martin Nilsson  @(cd build/etc && $(MAKE) PIKE="$(PIKE)" join) @(cd build/base && $(MAKE) PIKE="$(PIKE)" join)
0cb48e2001-08-20Martin Nilsson 
3151432001-11-16Martin Nilsson extract: build/etc/Makefile build/base/Makefile @(cd build/etc && $(MAKE) PIKE="$(PIKE)" extract) @(cd build/base && $(MAKE) PIKE="$(PIKE)" extract)
2fb5dc2006-04-20Henrik Grubbström (Grubba) build/manual.xml: build/autodoc.xml $(REFDOC)/structure/onepage.xml @$(PIKE) -x assemble_autodoc $(REFDOC)/structure/onepage.xml build/autodoc.xml > build/manual.xml
3151432001-11-16Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) build/traditional.xml: build/autodoc.xml $(REFDOC)/structure/traditional.xml @$(PIKE) -x assemble_autodoc $(REFDOC)/structure/traditional.xml build/autodoc.xml > build/traditional.xml
3151432001-11-16Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) build/modref.xml: build/autodoc.xml modref.xml @$(PIKE) -x assemble_autodoc modref.xml build/autodoc.xml > build/modref.xml
3151432001-11-16Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) build/autodoc.xml: $(XMLFILES) build/etc build/base build/protocols @$(PIKE) -x extract_autodoc -q --srcdir=modules \ --builddir=build/etc @$(PIKE) -x extract_autodoc -q --srcdir=../base_server \ --builddir=build/base @$(PIKE) -x extract_autodoc -q --srcdir=../protocols \ --builddir=build/protocols @$(PIKE) -x join_autodoc --quiet --post-process build/autodoc.xml \ build/etc build/base build/protocols
e91ddf2001-08-23Martin Nilsson 
3151432001-11-16Martin Nilsson # Directories
e91ddf2001-08-23Martin Nilsson build/etc: build @test -d build/etc || mkdir build/etc build/base: build @test -d build/base || mkdir build/base
0cb48e2001-08-20Martin Nilsson 
2fb5dc2006-04-20Henrik Grubbström (Grubba) build/protocols: build @test -d build/protocols || mkdir build/protocols
0cb48e2001-08-20Martin Nilsson build: @test -d build || mkdir build html_manual: @test -d html_manual || mkdir html_manual # @test -d html_manual/images || mkdir html_manual/images
3151432001-11-16Martin Nilsson traditional_manual: @test -d traditional_manual || mkdir traditional_manual
0cb48e2001-08-20Martin Nilsson clean:
2fb5dc2006-04-20Henrik Grubbström (Grubba)  @rm -rf build || /bin/true