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 zdraft ramdisk intel binutils
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
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
))
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
)
53 -tar cvzf
$(TGZ
) $(SRCS
) $(SUBDIRS
) makefile Makefile
55 .PHONY
: subdirs
$(SUBDIRS
)
57 subdirs
: $(MAKEFILE
) $(SUBDIRS
)
60 # cp --reply=yes Makefile $@;
61 # /bin/cp -i Makefile $@;
64 cd
$@
&& $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$@
66 clean_all
: clean_html clean_sub
72 for DIR in
$(SUBDIRS
); do \
73 cd
$$DIR && $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$$DIR clean_html
&& cd ..
/; \