summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-07-27 12:30:00 -0400
committerDave Reisner <dreisner@archlinux.org>2014-07-30 20:37:23 -0400
commitca642b0dad8c5ee1ec9d172eae534dacd79d9410 (patch)
tree74dd51e2da42a7dfc49dec2ee452de67b6fd3c8a /Makefile
downloadasp32-ca642b0dad8c5ee1ec9d172eae534dacd79d9410.tar.xz
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..18f6786
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+PACKAGE_NAME = asp
+VER=0
+
+PREFIX = /usr/local
+
+BINPROGS = \
+ asp
+
+MANPAGES = \
+ man/asp.1
+
+INCLUDES = \
+ package.inc.sh \
+ remote.inc.sh
+
+all: $(BINPROGS) $(MANPAGES)
+
+V_GEN = $(_v_GEN_$(V))
+_v_GEN_ = $(_v_GEN_0)
+_v_GEN_0 = @echo " GEN " $@;
+
+edit = $(V_GEN) m4 -P $@.in >$@ && chmod go-w,+x $@
+
+%: %.in $(INCLUDES)
+ $(edit)
+
+doc: $(MANPAGES)
+man/%: man/%.txt Makefile
+ a2x -d manpage \
+ -f manpage \
+ -a manversion=$(VERSION) \
+ -a manmanual="$(PACKAGE_NAME) manual" $<
+
+clean:
+ $(RM) $(BINPROGS) $(MANPAGES)
+
+install: all
+ install -dm755 $(DESTDIR)$(PREFIX)/bin
+ install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
+
+uninstall:
+ for f in $(BINPROGS); do $(RM) $(DESTDIR)$(PREFIX)/bin/$$f; done
+ $(RM) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_archinstallscripts
+
+dist:
+ git archive --format=tar --prefix=$(PACKAGE_NAME)-$(VER)/ v$(VER) | gzip -9 > $(PACKAGE_NAME)-$(VER).tar.gz
+ gpg --detach-sign --use-agent $(PACKAGE_NAME)-$(VER).tar.gz
+
+.PHONY: all clean install uninstall dist