summaryrefslogtreecommitdiff
path: root/Makefile
blob: bbb19d1c62b6b3bc359a8ccff56f0e15e6868484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
DESTDIR=
prefix=/usr/local
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin

bash=/bin/bash

EDIT = { m4 -P | sed 's|@bash@|$(bash)|g'; }
INSTALL_PROGRAM = install -Dm755
RM = rm -f



targets = ediff emacsmail emacsterm

all: PHONY $(targets)
install: PHONY $(addprefix $(DESTDIR)$(bindir)/,$(targets))
uninstall: PHONY
	$(RM) -- $(addprefix $(DESTDIR)$(bindir)/,$(targets))
clean: PHONY
	$(RM) -- $(addsuffix .sh,$(targets))
distclean: PHONY clean
	$(RM) -- $(targets)



%.sh: %.sh.in common.sh
	$(EDIT) < $< > $@

$(DESTDIR)$(bindir)/%: %
	$(INSTALL_PROGRAM) $< $@



.PHONY: PHONY
.DELETE_ON_ERROR: