.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} include config.mk DEST = ~/www/alessandroiezzi.it all: ${OBJ} install: all mkdir -p ${DEST} find . -name "*.html" -exec tar -rvf out.tar {} \; cp ip.php ${DEST}/ tar -xf out.tar -C ${DEST} cp -r assets/ ${DEST}/assets cp search/index.cgi ${DEST}/search/ cp search/.htaccess ${DEST}/search/ deploy: for i in `find * -name "*.html"`; do echo $i | sed "s/`basename $i`//"; done clean: rm -f ${OBJ} out.tar find -E * -regex ".*\.(trhtml|tmp)" -exec rm -f {} \; rm -rf ${DEST}/* .rhtml.html .rphp.php: navigation.rhtml.inc master.rhtml ${HYDE} -b ${BASEHREF} -f $< > $@