Integrated documentation building into root Makefile

This commit is contained in:
Alvin Moore 2018-03-13 13:02:45 -07:00 committed by John Brownlee
parent 7d1984b4d4
commit 7006f878c1
4 changed files with 22 additions and 19 deletions

View File

@ -144,7 +144,7 @@ OBJDIR := .objs
include $(MK_INCLUDE)
clean: $(CLEAN_TARGETS)
clean: $(CLEAN_TARGETS) docpreview_clean
@echo "Cleaning toplevel"
@rm -rf $(OBJDIR)
@rm -rf $(DEPSDIR)
@ -174,12 +174,14 @@ lib/libstdc++.a: $(shell $(CC) -print-file-name=libstdc++_pic.a)
@ar rcs $@ .libstdc++/*.o
@rm -r .libstdc++
docpreview: javadoc godoc
TARGETS= $(MAKE) -C documentation docpreview
ifeq ($(PLATFORM),osx)
MD5SUM=md5
else
MD5SUM=md5sum
endif
docpreview_clean:
CLEAN_TARGETS= $(MAKE) -C documentation docpreview_clean
docpackage: javadoc godoc
TARGETS= $(MAKE) -C documentation docpackage
.SECONDEXPANSION:

View File

@ -61,6 +61,12 @@ USERID := $(shell id -u)
USER := $(shell whoami)
PROCESSID := $(shell echo "$$$$")
ifeq ($(PLATFORM),osx)
MD5SUM=md5
else
MD5SUM=md5sum
endif
#
# Define the Java Variables

View File

@ -1,19 +1,17 @@
include ../build/scver.mk
docpreview:
docprereqs:
$(MAKE) -C sphinx html
cp -r ../bindings/java/javadoc sphinx/.out/html
cp -r ..//bindings/go/godoc sphinx/.out/html
cp -r ../bindings/go/godoc sphinx/.out/html
rm -f sphinx/.out/html/documentation
ln -s . sphinx/.out/html/documentation
docpreview: docprereqs
@( cd sphinx/.out/html && ! grep FIXME * && python -m SimpleHTTPServer $$((0x$$(echo ${USER} | $(MD5SUM) | awk '{print $$1}' | cut -c1-8)%8000+8000)) )
docpreview_clean:
$(MAKE) sphinx clean
$(MAKE) -C sphinx clean
docpackage:
$(MAKE) -C sphinx html
cp -r ../../foundationdb/bindings/java/javadoc sphinx/.out/html
cp -r ../../foundationdb/bindings/go/godoc sphinx/.out/html
rm -f sphinx/.out/html/documentation
ln -s . sphinx/.out/html/documentation
docpackage: docprereqs
$(MAKE) -C sphinx package

View File

@ -14,9 +14,6 @@ GIT_HEAD_REF := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
GIT_REPO_URL := $(shell git config --get remote.origin.url)
USER ?= $(shell whoami)
MD5SUM ?= md5sum
# You can set these variables from the command line.
#VERSIONOPTS := -D version=$(VERSION) -D release=$(RELEASE)
SPHINXOPTS := -c .
@ -113,4 +110,4 @@ livehtml: html
# removed html prerequisite because it is previously explictly invoked
package:
mkdir -p $(DISTDIR)
cd $(BUILDDIR)/html && tar czf $(DISTDIR)/$(PROJECT_NAME)-$(RELEASE).tar.gz .
cd $(BUILDDIR)/html && tar czf $(DISTDIR)/$(PROJECT_NAME)-$(RELEASE).tar.gz .