[ADD] git config file
[arrow.git] / viki / Makefile
blob9117e57fdefcc38d60387303be87c1aa59c193ca
1 # Makefile for generate html/xhtml/latex from Viki source
3 # Rongjun Mu, Aug. 23, 2004
5 # $Id: makefile,v 1.1.1.1 2004/09/02 16:27:36 murj Exp $
8 ### user options ###
10 # output html to this directory, NO extra spaces at the end!
11 HTMLDIR = /work/web.arrow/viki
12 # SUBDIRS = lpi vim dpkg dev # sub dirs
13 SUBDIRS:=arm buildroot busybox english gimp gtk humanism
14 SUBDIRS+=kernel mips misc mysql ncurses php playground
15 SUBDIRS+=qemu tex uboot utils zdraft
17 TOP_CSS_NAME=deplate.css
18 CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH)
19 TGZ = arrow_viki.tar.gz # backup all your data into this archieve
21 ### in most cases, you need not modify the followings ###
23 # where is the css file located, NO extra spaces at the end!
24 CSS_PATH = ~/.deplate/css
25 DEPLATE = deplate
26 # use this module
27 MODULE = utf8
28 # deplate common configuration file, not used yet.
29 DEPLATECONFIG = ~/.deplate/config.rb
30 # make them visible in sub dirs
31 export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG TOP_CSS_NAME
33 SRCS := $(wildcard *.viki)
34 HTML := $(patsubst %.viki, $(HTMLDIR)/%.html, $(wildcard *.viki))
35 CSS := $(HTMLDIR)/$(CSS_NAME)
36 MAKEFILE := $(patsubst %, %/Makefile, $(SUBDIRS))
38 all : html subdirs
40 html : $(HTML) $(CSS)
42 tgz: $(TGZ) # package all of your sourcefiles
44 $(HTMLDIR)/%.html : %.viki
45 $(DEPLATE) -m $(MODULE) -d $(HTMLDIR) -f html $<
47 $(CSS) : $(CSS_PATH)/$(CSS_NAME)
48 -cp --reply=yes $(CSS_PATH)/$(CSS_NAME) $(CSS)
50 $(TGZ) :
51 -rm -f $(TGZ)
52 -tar cvzf $(TGZ) $(SRCS) $(SUBDIRS) makefile Makefile
54 .PHONY: subdirs $(SUBDIRS)
56 subdirs: $(MAKEFILE) $(SUBDIRS)
58 %/Makefile : Makefile
59 # cp --reply=yes Makefile $@;
60 # /bin/cp -i Makefile $@;
62 $(SUBDIRS):
63 cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@
65 clean_all : clean_html clean_sub
67 clean_html :
68 -rm -rf $(HTML)
70 clean_sub :
71 for DIR in $(SUBDIRS); do \
72 cd $$DIR && $(MAKE) HTMLDIR=$(HTMLDIR)/$$DIR clean_html && cd ../; \
73 done