From 089ba73c3e357cb25d18c99fd05e70c8340578d1 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 9 Jul 2024 12:24:36 +0200 Subject: Rename ip.rhtml to ip.rphp --- Makefile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6874267..421e562 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,25 @@ -.SUFFIXES: .rhtml .html .tmpl .trhtml .rhtml.config +.SUFFIXES: .rhtml .html .tmpl .trhtml .rhtml.config .rphp .php -include config.mk - -DEST = ~/www/alessandroiezzi.it +# Finds any file with the extensions: +# .rthml +# .rphp +# Excludes: +# master.rhtml +SRC != find -E * ! -name 'master.rhtml' -regex '.*\.r(html|php)*' +# 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 -SOURCES != find . -name "*.rhtml" | grep -v master | sed 's|\./||g' -OBJECTS = ${SOURCES:.rhtml=.html} +DEST = ~/www/alessandroiezzi.it CONFIGS != find . -name "*.rhtml.config" | grep -v master | sed 's|\./||g' -all: ${OBJECTS} ip.php +all: ${OBJ} install: all mkdir -p ${DEST} @@ -33,8 +41,5 @@ clean: rm -rf ${DEST}/* rm -f ip.php -.rhtml.html: navigation.rhtml.inc master.rhtml - ${HYDE} -b ${BASEHREF} -f $< > $@ - -ip.php: ip.rhtml.php +.rhtml.html .rphp.php: navigation.rhtml.inc master.rhtml ${HYDE} -b ${BASEHREF} -f $< > $@ -- cgit v1.2.3