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: