0cb48e2001-08-20Martin Nilsson # # Main makefile for extracting autodoc. #
2ec1a82006-04-22Henrik Grubbström (Grubba) # $Id: Makefile,v 1.7 2006/04/22 15:20:13 grubba Exp $
0cb48e2001-08-20Martin Nilsson #
3151432001-11-16Martin Nilsson PIKE=pike
6df9f92006-04-22Henrik Grubbström (Grubba) REFDOC=`$(PIKE) -x module --query system_doc_path`/src
0cb48e2001-08-20Martin Nilsson 
6df9f92006-04-22Henrik Grubbström (Grubba) # Recursive make to avoid evaluating REFDOC above so many times. all: $(MAKE) $(MAKE_FLAGS) PIKE="$(PIKE)" REFDOC="$(REFDOC)" modref
0cb48e2001-08-20Martin Nilsson 
3151432001-11-16Martin Nilsson modref: build/modref.xml rm -rf modref || /bin/true @mkdir modref
6df9f92006-04-22Henrik Grubbström (Grubba)  @cp $(REFDOC)/structure/modref.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 
6df9f92006-04-22Henrik Grubbström (Grubba) build/manual.xml: build/autodoc.xml @$(PIKE) -x assemble_autodoc $(REFDOC)/structure/onepage.xml \ build/autodoc.xml >build/manual.xml
3151432001-11-16Martin Nilsson 
6df9f92006-04-22Henrik Grubbström (Grubba) build/traditional.xml: build/autodoc.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
6df9f92006-04-22Henrik Grubbström (Grubba)  @$(PIKE) -x assemble_autodoc modref.xml build/autodoc.xml \ >build/modref.xml
3151432001-11-16Martin Nilsson 
6df9f92006-04-22Henrik Grubbström (Grubba) build/autodoc.xml: build/etc build/base build/protocols force
2ec1a82006-04-22Henrik Grubbström (Grubba)  $(PIKE) -x extract_autodoc -q --srcdir=modules --builddir=build/etc $(PIKE) -x extract_autodoc -q --srcdir=../base_server \
2fb5dc2006-04-20Henrik Grubbström (Grubba)  --builddir=build/base
2ec1a82006-04-22Henrik Grubbström (Grubba)  $(PIKE) -x extract_autodoc -q --srcdir=../protocols \
2fb5dc2006-04-20Henrik Grubbström (Grubba)  --builddir=build/protocols
2ec1a82006-04-22Henrik Grubbström (Grubba)  pike_autodoc="$(REFDOC)/core_autodoc.xml"; \ if [ -f "$$pike_autodoc" ]; then \ echo "Joining with $$pike_autodoc."; \ else \ echo "$$pike_autodoc not found."; \ pike_autodoc=""; \ fi; \
6df9f92006-04-22Henrik Grubbström (Grubba)  $(PIKE) -x join_autodoc --quiet --post-process build/autodoc.xml \
2ec1a82006-04-22Henrik Grubbström (Grubba)  $$pike_autodoc 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
6df9f92006-04-22Henrik Grubbström (Grubba) force:
0cb48e2001-08-20Martin Nilsson clean:
2fb5dc2006-04-20Henrik Grubbström (Grubba)  @rm -rf build || /bin/true