@@ -3,6 +3,9 @@ MAKEFLAGS += -j
33MAKEFLAGS += -r
44MAKEFLAGS += --no-print-directory
55
6+ # includes
7+ include bin/makefile.compatibility
8+
69# Build directory tweaking.
710output = build
811public-output = $(output ) /public
@@ -15,26 +18,22 @@ manual-branch = master
1518current-branch := $(shell git symbolic-ref HEAD 2>/dev/null | cut -d "/" -f "3" )
1619last-commit := $(shell git rev-parse --verify HEAD)
1720
21+ timestamp := $(shell date +% Y% m% d% H% M)
22+
1823ifeq ($(current-branch ) ,$(manual-branch ) )
1924current-if-not-manual = $(manual-branch )
2025else
2126current-if-not-manual = $(current-branch )
2227endif
2328
24- # Fixing `sed` for OS X
25- UNAME := $(shell uname)
26- ifeq ($(UNAME ) , Linux)
27- SED_ARGS_FILE = -i -r
28- SED_ARGS_REGEX = -r
29- endif
30- ifeq ($(UNAME ) , Darwin)
31- SED_ARGS_FILE = -i "" -E
32- SED_ARGS_REGEX = -E
33- endif
34-
3529# Sphinx variables.
3630SPHINXOPTS = -c ./
3731SPHINXBUILD = sphinx-build
32+
33+ ifdef NITPICK
34+ SPHINXOPTS += -n -w $(branch-output ) /build.$(timestamp ) .log
35+ endif
36+
3837PAPER = letter
3938PAPEROPT_a4 = -D latex_paper_size=a4
4039PAPEROPT_letter = -D latex_paper_size=letter
@@ -292,12 +291,6 @@ epub:
292291#
293292# #####################################################################
294293
295- ifeq ($(shell test -f /etc/arch-release && echo arch || echo Linux) ,arch)
296- PYTHONBIN = python2
297- else
298- PYTHONBIN = python
299- endif
300-
301294$(branch-output ) /sitemap.xml.gz :$(branch-output ) /dirhtml
302295
303296SITEMAPBUILD = $(PYTHONBIN ) bin/sitemap_gen.py
@@ -437,8 +430,7 @@ PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction
437430#
438431# #########################################################################
439432
440- ARCHIVE_DATE := $(shell date +% s)
441- archive :$(public-output ) .$(ARCHIVE_DATE ) .tar.gz
433+ archive :$(public-output ) .$(timestamp ) .tar.gz
442434 @echo [archive]: created $< archive.
443435$(public-output ) .$(ARCHIVE_DATE ) .tar.gz :$(public-output )
444436 tar -czvf $@ $<
0 commit comments