2 studier studier
/images \
7 top_make_dir
:=${shell pwd
}
8 build_dir
:=${top_make_dir}/.build
9 dirs
:=${addprefix ${build_dir}/, ${VPATH}}
11 ${wildcard ${addsuffix /*.gen
, ${VPATH}}} \
12 ${wildcard ${addsuffix /*.jpg
, ${VPATH}}} \
13 ${wildcard ${addsuffix /*.gif
, ${VPATH}}} \
14 ${wildcard ${addsuffix /*.css
, ${VPATH}}}
15 figdeps
:=${wildcard ${addsuffix /*.fig
, ${VPATH}}}
17 targ
:=${addprefix ${build_dir}/, ${deps
:.gen
=.html
} ${figdeps
:.fig
=.gif
}}
20 .PHONY
: help
all clean publish checkin ci
test testfirefox
23 @echo
"==================="
24 @echo
" Available targets"
25 @echo
"==================="
26 @echo
" * all:: Builds all pages and images"
27 @echo
" * publish:: publish pages to webserver"
28 @echo
" * clean:: removes the build from the system"
29 @echo
" * test:: Uses konqueror or mozilla to view build"
30 @echo
" * test-firefox:: Uses firefox to view build"
31 @echo
" * help:: This little help text"
33 @echo
" If you set the environment var browser=mozilla,"
34 @echo
" that browser will be used."
36 @echo
"To execute call make all"
42 @echo
"************** Be wise!!!"
43 @echo
" if you are done now, you should remove"
44 @echo
" your checked out catalog to prevent any"
45 @echo
" fatal mistakes!!!"
46 @echo
"**************"
49 if
[ ! -z
"${browser}" ]; then \
50 ${browser} ${build_dir}/index.html
; \
52 if
[ ! -z
"`which konqueror`" ]; then \
53 konqueror
${build_dir}/index.html
; \
55 mozilla
${build_dir}/index.html
; \
60 cd
${build_dir};firefox-bin index.html
63 mozilla
${build_dir}/index.html
66 scp
-rpq
${build_dir}/* tobibobi@ftp.mip.sdu.dk
:/home
/tobibobi
/WWWpublic
67 @echo
"*************** Be wise!!!"
68 @echo
" You have just made a publish of files."
69 @echo
" You should make a 'make checkin' to make"
70 @echo
" sure that your repository is up to date"
71 @echo
" Any work after this point is"
75 @echo
"***************"
83 ${build_dir}/%.css
:%.css
86 ${build_dir}/%.html
:%.gen inc
/*.inc
${dirs} makefile
87 cat
$< | sed
-f inc
/compile.sed| sed
-f inc
/compile.sed| sed
-f inc
/compile.sed
> $@
89 ${build_dir}/%.gif
:%.gif
${dirs}
92 ${build_dir}/%.jpg
:%.jpg
${dirs}
95 ${build_dir}/%.gif
:%.fig
${dirs}