summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8fc2ada
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,46 @@
+DESTDIR=
+prefix=/usr/local
+exec_prefix=$(prefix)
+bindir=$(exec_prefix)/bin
+
+bash=/usr/bin/env bash
+
+EDIT = { m4 -P | sed -e 's|@bash@|$(bash)|g' -e 's|@VERSION@|$(VERSION)|'; }
+INSTALL_PROGRAM = install -Dm755
+RM = rm -f
+
+PACKAGE = emacsutils
+VERSION = 0.9
+
+topoutdir=.
+topsrcdir=.
+
+include $(topoutdir)/build-aux/Makefile.head.mk
+
+
+ifeq ($(wildcard .git/),)
+include .srcfiles.mk
+else
+.srcfiles.mk: FORCE
+ @git ls-files | sed 's|^|std.src_files += |' | $(WRITE_IFCHANGED) $@
+-include .srcfiles.mk
+endif
+
+std.out_files = ediff emacsmail emacsterm emacsterm-rxvt emacsterm-xterm
+std.sys_files = $(addprefix $(bindir)/,$(std.out_files))
+std.clean_files += *.sh
+
+%.sh: %.sh.in common.sh.in .var.bash .var.VERSION
+ $(EDIT) < $< > $@
+
+$(DESTDIR)$(bindir)/%: %
+ $(INSTALL_PROGRAM) $< $@
+
+.var.%: FORCE
+ @printf '%s' '$($*)' | sed 's|^|#|' | $(WRITE_IFCHANGED) '$@'
+-include $(wildcard .var.*)
+
+.PHONY: PHONY FORCE
+.DELETE_ON_ERROR:
+.SECONDARY:
+include $(topoutdir)/build-aux/Makefile.tail.mk