[UP] add more viki file from internet, change some shell script also.
[arrow.git] / viki / kernel / Makefile
blob8c6ebb4076d4f9538308b2046af0e0498e487536
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:=ldd3
15 CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH)
16 TGZ = arrow_viki.tar.gz # backup all your data into this archieve
18 ### in most cases, you need not modify the followings ###
20 # where is the css file located, NO extra spaces at the end!
21 CSS_PATH = ~/.deplate/css
22 DEPLATE = deplate
23 # use this module
24 MODULE = utf8
25 # deplate common configuration file, not used yet.
26 DEPLATECONFIG = ~/.deplate/config.rb
27 export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG # make them visible in sub dirs
29 SRCS := $(wildcard *.viki)
30 HTML := $(patsubst %.viki, $(HTMLDIR)/%.html, $(wildcard *.viki))
31 CSS := $(HTMLDIR)/$(CSS_NAME)
32 MAKEFILE := $(patsubst %, %/Makefile, $(SUBDIRS))
34 all : html subdirs
36 html : $(HTML) $(CSS)
38 tgz: $(TGZ) # package all of your sourcefiles
40 $(HTMLDIR)/%.html : %.viki
41 $(DEPLATE) -m $(MODULE) -d $(HTMLDIR) -f html $<
43 $(CSS) : $(CSS_PATH)/$(CSS_NAME)
44 -cp --reply=yes $(CSS_PATH)/$(CSS_NAME) $(CSS)
46 $(TGZ) :
47 -rm -f $(TGZ)
48 -tar cvzf $(TGZ) $(SRCS) $(SUBDIRS) makefile Makefile
50 .PHONY: subdirs $(SUBDIRS)
52 subdirs: $(MAKEFILE) $(SUBDIRS)
54 %/Makefile : Makefile
55 # cp --reply=yes Makefile $@;
56 /bin/cp -i Makefile $@;
58 $(SUBDIRS):
59 cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@
61 clean_all : clean_html clean_sub
63 clean_html :
64 -rm -rf $(HTML)
66 clean_sub :
67 for DIR in $(SUBDIRS); do \
68 cd $$DIR && $(MAKE) HTMLDIR=$(HTMLDIR)/$$DIR clean_html && cd ../; \
69 done