summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Schafft <lion@lion.leolix.org>2015-10-04 09:38:07 +0000
committerPhilipp Schafft <lion@lion.leolix.org>2017-03-27 02:11:19 +0000
commitd15367abe7409b1eece1c9f11ba90248e7304ae2 (patch)
tree0ad16e23caf1cb0864e7a18d315d8e5ad356c610
parenta7a5c051e4487a90c7407223ef27b1ef92939cc3 (diff)
added support for preprocessors: cpp
-rwxr-xr-xwebgen3
1 files changed, 3 insertions, 0 deletions
diff --git a/webgen b/webgen
index d727a62..7dc364d 100755
--- a/webgen
+++ b/webgen
@@ -89,6 +89,9 @@ cat_file() {
none)
cat -- "$_file"
;;
+ cpp)
+ cpp -P -o - -D__TEMPLATE__="\"$_tpl\"" -D__TEMPLATE_CLEAN__="\"$CLEANTPLNAME\"" -D __OUTPUT_FILE__="\"$OF\"" ./"$_file"
+ ;;
*)
echo "Error: Unknown preprocessor: $PREPROCESSOR" >&2
;;