aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile27
-rw-r--r--ip.rphp (renamed from ip.rhtml.php)0
-rw-r--r--ip.rphp.config (renamed from ip.rhtml.php.config)0
3 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 $< > $@
diff --git a/ip.rhtml.php b/ip.rphp
index 94b63fb..94b63fb 100644
--- a/ip.rhtml.php
+++ b/ip.rphp
diff --git a/ip.rhtml.php.config b/ip.rphp.config
index ad50284..ad50284 100644
--- a/ip.rhtml.php.config
+++ b/ip.rphp.config