summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--[l---------]Makefile46
1 files changed, 45 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4ecdba5..b3c7379 120000..100644
--- a/Makefile
+++ b/Makefile
@@ -1 +1,45 @@
-build-aux/Makefile.README.mk \ No newline at end of file
+bash=/usr/bin/env bash
+
+EDIT = { m4 -P | sed -e 's|@bash@|$(bash)|g' -e 's|@VERSION@|$(VERSION)|'; }
+
+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
+
+programs = ediff emacsmail emacsterm emacsterm-rxvt emacsterm-xterm
+desktops = emacsmail emacsterm
+std.out_files = $(programs) $(addsuffix .desktop,$(desktops))
+std.sys_files = $(addprefix $(bindir)/,$(programs)) $(foreach d,$(desktops),$(datarootdir)/applications/$d.desktop)
+std.clean_files += *.sh
+
+%.sh: %.sh.in common.sh.in .var.bash .var.VERSION
+ $(EDIT) < $< > $@
+
+$(DESTDIR)$(bindir)/%: %
+ $(NORMAL_INSTALL)
+ $(INSTALL_PROGRAM) $< $@
+$(DESTDIR)$(datarootdir)/applications/%: %
+ $(NORMAL_INSTALL)
+ $(INSTALL_DATA) $< $@
+
+.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