aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-05-08 20:14:29 -0400
committerB. Watson <yalhcru@gmail.com>2020-05-08 20:18:28 -0400
commite7c665d3c43fcad0f2e3f893b633f44c8fb18a38 (patch)
tree60d25770a3e0d45fbff1009d651aa1e7709a3da8 /Makefile
parenteda5398a6dd6e40eac3eaf0dc94f949b2322a16a (diff)
downloadmiragextract-e7c665d3c43fcad0f2e3f893b633f44c8fb18a38.tar.gz
0.0.1 release
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 25 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 92ae3fa..22766e5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# Makefile for miragextract
####
-# Packagers: override these the make command line as needed.
+# Packagers: override these on the make command line as needed.
# Intended for optimizations, but you could include other flags here.
OPTFLAGS=-O2
@@ -21,9 +21,21 @@ DESTDIR=
STRIPBIN=y
GZIPMAN=y
+# Normally these will end up as root and root (or possibly wheel). You
+# could also set 'CHOWN=/bin/true' to skip it.
+OWNER=$(shell id -u 0)
+GROUP=$(shell id -ng 0)
+
+# These are only used if you're rebuilding the man and/or html pages,
+# e.g. because you've patched them.
+RST2MAN=rst2man.py
+RST2HTML=rst2html4.py
+
#
###
+# Hopefully, no user-serviceable parts below this line.
+
PROJ=miragextract
DOCS=README FAQ ChangeLog $(PROJ).html
@@ -42,19 +54,11 @@ man: $(PROJ).1
html: $(PROJ).html
-test: all
- ./$(PROJ) test.cue
-
-push: all man html
- git add $(PROJ).1 $(PROJ).html
- git commit -m'auto-regenerate man/html pages' || true
- git push
-
$(PROJ).1: $(PROJ).rst
- rst2man.py $(PROJ).rst > $(PROJ).1
+ $(RST2MAN) $(PROJ).rst > $(PROJ).1
$(PROJ).html: $(PROJ).rst
- rst2html4.py $(PROJ).rst > $(PROJ).html
+ $(RST2HTML) $(PROJ).rst > $(PROJ).html
ifeq ($(shell whoami),root)
CHOWN=chown
@@ -79,7 +83,16 @@ endif
for i in $(DOCS); do \
cp $$i $(DESTDIR)$(DOCDIR); \
chmod 644 $(DESTDIR)$(DOCDIR)/$$i; \
- $(CHOWN) root:root $(DESTDIR)$(DOCDIR)/$$i; \
+ $(CHOWN) $(OWNER):$(GROUP) $(DESTDIR)$(DOCDIR)/$$i; \
done
+# These 2 are maintainer-specific targets.
+test: all
+ ./$(PROJ) test.cue
+
+push: all man html
+ git add $(PROJ).1 $(PROJ).html
+ git commit -m'auto-regenerate man/html pages' || true
+ git push
+
.PHONY: all man html test push install