blob: e17097337add5962ad6f93d4ac3e3f60a9e02db8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
.SUFFIXES: .rhtml .html .tmpl .trhtml .rhtml.config .rphp .php
# Finds any file with the extensions:
# .rthml
# .rphp
# Excludes:
# master.rhtml
SRC != find -E * ! -name 'master.rhtml' -regex '.*\.r(html|php)'
CFG != find -E * -regex '.*\.r(html|php)\.config'
# The first assignment is to change extension from .rhtml to .html. The second
# one is used to replace .rphp with .php (note the use of :=, in this way, the
# old value can be replaced)
OBJ = ${SRC:.rhtml=.html}
OBJ := ${OBJ:.rphp=.php}
TMP_FILES != find -E * -regex ".*\.(trhtml|tmp)"
include config.mk
all: ${OBJ}
dist: all
mkdir -p $@
rsync -R ${OBJ} $@/
cp -r assets/ $@/assets
cp search/index.cgi search/.htaccess $@/search/
@cd $@ && tar cf ../${ARCHIVE} .
install: all ${INSTALL_DIR}
mkdir -p ${DEST}
find . -name "*.html" -exec tar -rvf ${ARCHIVE} {} \;
cp ip.php ${DEST}/
tar -xf ${ARCHIVE} -C ${DEST}
cp -r assets/ ${DEST}/assets
cp search/index.cgi ${DEST}/search/
cp search/.htaccess ${DEST}/search/
${INSTALL_DIR}:
mkdir -p $@
deploy:
for i in `find * -name "*.html"`; do echo $i | sed "s/`basename $i`//"; done
clean:
rm -f ${OBJ} ${ARCHIVE} ${TMP_FILES}
rm -rf ${INSTALL_DIR} dist
.rhtml.html .rphp.php: navigation.rhtml.inc master.rhtml
${HYDE} -b ${BASEHREF} -f $< > $@
|