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 $
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 wiki z_draft
17 CSS_NAME
= ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH)
18 TGZ
= arrow_viki.
tar.gz
# backup all your data into this archieve
20 ### in most cases, you need not modify the followings ###
22 # where is the css file located, NO extra spaces at the end!
23 CSS_PATH
= ~
/.deplate
/css
27 # deplate common configuration file, not used yet.
28 DEPLATECONFIG
= ~
/.deplate
/config.rb
29 export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG
# make them visible in sub dirs
31 SRCS
:= $(wildcard *.viki
)
32 HTML
:= $(patsubst %.viki
, $(HTMLDIR
)/%.html
, $(wildcard *.viki
))
33 CSS
:= $(HTMLDIR
)/$(CSS_NAME
)
34 MAKEFILE
:= $(patsubst %, %/Makefile
, $(SUBDIRS
))
40 tgz
: $(TGZ
) # package all of your sourcefiles
42 $(HTMLDIR
)/%.html
: %.viki
43 $(DEPLATE
) -m
$(MODULE
) -d
$(HTMLDIR
) -f html
$<
45 $(CSS
) : $(CSS_PATH
)/$(CSS_NAME
)
46 -cp
--reply
=yes
$(CSS_PATH
)/$(CSS_NAME
) $(CSS
)
50 -tar cvzf
$(TGZ
) $(SRCS
) $(SUBDIRS
) makefile Makefile
52 .PHONY
: subdirs
$(SUBDIRS
)
54 subdirs
: $(MAKEFILE
) $(SUBDIRS
)
57 # cp --reply=yes Makefile $@;
58 /bin
/cp
-i Makefile
$@
;
61 cd
$@
&& $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$@
63 clean_all
: clean_html clean_sub
69 for DIR in
$(SUBDIRS
); do \
70 cd
$$DIR && $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$$DIR clean_html
&& cd ..
/; \