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
:=ldd3 initramfs
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
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
))
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
)
48 -tar cvzf
$(TGZ
) $(SRCS
) $(SUBDIRS
) makefile Makefile
50 .PHONY
: subdirs
$(SUBDIRS
)
52 subdirs
: $(MAKEFILE
) $(SUBDIRS
)
55 # cp --reply=yes Makefile $@;
56 # /bin/cp -i Makefile $@;
59 cd
$@
&& $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$@
61 clean_all
: clean_html clean_sub
67 for DIR in
$(SUBDIRS
); do \
68 cd
$$DIR && $(MAKE
) HTMLDIR
=$(HTMLDIR
)/$$DIR clean_html
&& cd ..
/; \