Integrated documentation building into root Makefile
This commit is contained in:
parent
7d1984b4d4
commit
7006f878c1
14
Makefile
14
Makefile
|
@ -144,7 +144,7 @@ OBJDIR := .objs
|
||||||
|
|
||||||
include $(MK_INCLUDE)
|
include $(MK_INCLUDE)
|
||||||
|
|
||||||
clean: $(CLEAN_TARGETS)
|
clean: $(CLEAN_TARGETS) docpreview_clean
|
||||||
@echo "Cleaning toplevel"
|
@echo "Cleaning toplevel"
|
||||||
@rm -rf $(OBJDIR)
|
@rm -rf $(OBJDIR)
|
||||||
@rm -rf $(DEPSDIR)
|
@rm -rf $(DEPSDIR)
|
||||||
|
@ -174,12 +174,14 @@ lib/libstdc++.a: $(shell $(CC) -print-file-name=libstdc++_pic.a)
|
||||||
@ar rcs $@ .libstdc++/*.o
|
@ar rcs $@ .libstdc++/*.o
|
||||||
@rm -r .libstdc++
|
@rm -r .libstdc++
|
||||||
|
|
||||||
|
docpreview: javadoc godoc
|
||||||
|
TARGETS= $(MAKE) -C documentation docpreview
|
||||||
|
|
||||||
ifeq ($(PLATFORM),osx)
|
docpreview_clean:
|
||||||
MD5SUM=md5
|
CLEAN_TARGETS= $(MAKE) -C documentation docpreview_clean
|
||||||
else
|
|
||||||
MD5SUM=md5sum
|
docpackage: javadoc godoc
|
||||||
endif
|
TARGETS= $(MAKE) -C documentation docpackage
|
||||||
|
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,12 @@ USERID := $(shell id -u)
|
||||||
USER := $(shell whoami)
|
USER := $(shell whoami)
|
||||||
PROCESSID := $(shell echo "$$$$")
|
PROCESSID := $(shell echo "$$$$")
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),osx)
|
||||||
|
MD5SUM=md5
|
||||||
|
else
|
||||||
|
MD5SUM=md5sum
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Define the Java Variables
|
# Define the Java Variables
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
|
include ../build/scver.mk
|
||||||
|
|
||||||
docpreview:
|
docprereqs:
|
||||||
$(MAKE) -C sphinx html
|
$(MAKE) -C sphinx html
|
||||||
cp -r ../bindings/java/javadoc sphinx/.out/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
|
rm -f sphinx/.out/html/documentation
|
||||||
ln -s . 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)) )
|
@( cd sphinx/.out/html && ! grep FIXME * && python -m SimpleHTTPServer $$((0x$$(echo ${USER} | $(MD5SUM) | awk '{print $$1}' | cut -c1-8)%8000+8000)) )
|
||||||
|
|
||||||
docpreview_clean:
|
docpreview_clean:
|
||||||
$(MAKE) sphinx clean
|
$(MAKE) -C sphinx clean
|
||||||
|
|
||||||
docpackage:
|
docpackage: docprereqs
|
||||||
$(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
|
|
||||||
$(MAKE) -C sphinx package
|
$(MAKE) -C sphinx package
|
||||||
|
|
|
@ -14,9 +14,6 @@ GIT_HEAD_REF := $(shell git rev-parse --short HEAD)
|
||||||
GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
|
GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
|
||||||
GIT_REPO_URL := $(shell git config --get remote.origin.url)
|
GIT_REPO_URL := $(shell git config --get remote.origin.url)
|
||||||
|
|
||||||
USER ?= $(shell whoami)
|
|
||||||
MD5SUM ?= md5sum
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
#VERSIONOPTS := -D version=$(VERSION) -D release=$(RELEASE)
|
#VERSIONOPTS := -D version=$(VERSION) -D release=$(RELEASE)
|
||||||
SPHINXOPTS := -c .
|
SPHINXOPTS := -c .
|
||||||
|
|
Loading…
Reference in New Issue