aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-09 12:24:36 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-09 12:24:36 +0200
commit089ba73c3e357cb25d18c99fd05e70c8340578d1 (patch)
tree73b3cd674355c4dc68e93ff5cb7283a3b8ff4de6 /Makefile
parenteb6998f8ce4119f208f97cbfc9180a605617732f (diff)
downloadwebsite-089ba73c3e357cb25d18c99fd05e70c8340578d1.tar.gz
website-089ba73c3e357cb25d18c99fd05e70c8340578d1.zip
Rename ip.rhtml to ip.rphp
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 16 insertions, 11 deletions
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 $< > $@