[UP] add some viki files, knowledge.
[arrow.git] / viki / Makefile
blob3ec21224ad7dd9d272b81d50264d8d591dd1a794
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 ramdisk intel binutils
16 SUBDIRS+=audio
18 TOP_CSS_NAME=deplate.css
19 CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH)
20 TGZ = arrow_viki.tar.gz # backup all your data into this archieve
22 ### in most cases, you need not modify the followings ###
24 # where is the css file located, NO extra spaces at the end!
25 CSS_PATH = ~/.deplate/css
26 DEPLATE = deplate
27 # use this module
28 MODULE = utf8
29 # deplate common configuration file, not used yet.
30 DEPLATECONFIG = ~/.deplate/config.rb
31 # make them visible in sub dirs
32 export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG TOP_CSS_NAME
34 SRCS := $(wildcard *.viki)
35 HTML := $(patsubst %.viki, $(HTMLDIR)/%.html, $(wildcard *.viki))
36 CSS := $(HTMLDIR)/$(CSS_NAME)
37 MAKEFILE := $(patsubst %, %/Makefile, $(SUBDIRS))
39 all : html subdirs
41 html : $(HTML) $(CSS)
43 tgz: $(TGZ) # package all of your sourcefiles
45 $(HTMLDIR)/%.html : %.viki
46 $(DEPLATE) -m $(MODULE) -d $(HTMLDIR) -f html $<
48 $(CSS) : $(CSS_PATH)/$(CSS_NAME)
49 -cp --reply=yes $(CSS_PATH)/$(CSS_NAME) $(CSS)
51 $(TGZ) :
52 -rm -f $(TGZ)
53 -tar cvzf $(TGZ) $(SRCS) $(SUBDIRS) makefile Makefile
55 .PHONY: subdirs $(SUBDIRS)
57 subdirs: $(MAKEFILE) $(SUBDIRS)
59 %/Makefile : Makefile
60 # cp --reply=yes Makefile $@;
61 # /bin/cp -i Makefile $@;
63 $(SUBDIRS):
64 cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@
66 clean_all : clean_html clean_sub
68 clean_html :
69 -rm -rf $(HTML)
71 clean_sub :
72 for DIR in $(SUBDIRS); do \
73 cd $$DIR && $(MAKE) HTMLDIR=$(HTMLDIR)/$$DIR clean_html && cd ../; \
74 done