summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk11
1 files changed, 4 insertions, 7 deletions
diff --git a/common.mk b/common.mk
index 89ab001..68b5d56 100644
--- a/common.mk
+++ b/common.mk
@@ -10,13 +10,6 @@ pkglibexecdir ?= $(libexecdir)/libretools
# This is used when using sources grabbed from devtools
edit = sed -e 's|m4_include(lib/\(.*\))|. $$(librelib \1)|'
-# Usage $(call indent,FILENAME)
-# Command to auto-indent a file.
-indent = emacs --batch $1 \
- --eval '(setq sh-basic-offset 8)' \
- --eval '(indent-region (point-min) (point-max) nil)' \
- -f save-buffer &>/dev/null
-
# Usage <INPUT $(pofmt) >OUTPUT
# Normalize a .po(t) file
pofmt = msguniq -Fi
@@ -89,6 +82,10 @@ build: PHONY $(build_files)
ronn --roff $(RONNFLAGS) < '$<' > '$@'
%.html: %.ronn
ronn --html $(RONNFLAGS) < '$<' > '$@'
+%: %.in
+ @echo "GEN $@"
+ @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; }
+ @chmod 755 "$@" || { rm -f -- '$@'; false; }
%.pot: %
{ $(xgettext-main); $(xgettext-prose); } | $(pofmt) > '$@'