* builds/freetype.mk: Add rule 'refdoc-venv'.

Add new rule `refdoc-venv' for building documentation in python
virtualenv. This is an ongoing discussion at:

  http://lists.nongnu.org/archive/html/freetype-devel/2018-07/msg00209.html

* builds/freetype.mk: Add rule `refdoc-venv'
* builds/{os}/*-def.mk: Add variable `BIN' for virtualenv.
This commit is contained in:
Nikhil Ramakrishnan 2018-07-28 17:05:38 +05:30
parent 628ca693b6
commit fecfbbb035
8 changed files with 30 additions and 1 deletions

View File

@ -16,6 +16,7 @@
DELETE := rm -f
CAT := cat
SEP := /
BIN := bin
BUILD_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi

View File

@ -18,6 +18,7 @@
DELETE := rm -f
CAT := cat
SEP := /
BIN := bin
BUILD_DIR := $(TOP_DIR)/builds/beos
PLATFORM := beos

View File

@ -16,6 +16,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BIN := Scripts
BUILD_DIR := $(TOP_DIR)/builds/dos
PLATFORM := dos

View File

@ -75,7 +75,7 @@
# The targets `objects' and `library' are defined at the end of this
# Makefile after all other rules have been included.
#
.PHONY: single multi objects library refdoc
.PHONY: single multi objects library refdoc refdoc-venv
# default target -- build single objects and library
#
@ -308,6 +308,28 @@ refdoc:
cd $(DOC_DIR) && mkdocs build
@echo Done.
VENV_NAME := env
VENV_ACTIVATE := $(VENV_NAME)$(SEP)$(BIN)$(SEP)activate
PYTHON := $(VENV_NAME)$(SEP)$(BIN)$(SEP)python
PIP := $(VENV_NAME)$(SEP)$(BIN)$(SEP)pip
refdoc-venv:
@echo Setting up virtualenv for Python...
virtualenv $(VENV_NAME)
@echo Installing requirements...
$(PIP) install -r $(SRC_DIR)/tools/docwriter/requirements.txt
@echo "Running docwriter..."
python -B $(SRC_DIR)/tools/docwriter/docwriter.py \
--prefix=ft2 \
--title=FreeType-$(version) \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
@echo Building static site...
cd $(DOC_DIR) && mkdocs build
@echo Done.
.PHONY: clean_project_std distclean_project_std
# Standard cleaning and distclean rules. These are not accepted

View File

@ -16,6 +16,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BIN := Scripts
BUILD_DIR := $(TOP_DIR)/builds/os2
PLATFORM := os2

View File

@ -20,6 +20,7 @@ DELETE := rm -f
DELDIR := rm -rf
CAT := cat
SEP := /
BIN := bin
# this is used for `make distclean' and `make install'
OBJ_BUILD ?= $(BUILD_DIR)

View File

@ -22,6 +22,7 @@ PLATFORM := unix
DELETE := rm -f
CAT := cat
SEP := /
BIN := bin
# we use a special devel ftoption.h
DEVEL_DIR := $(TOP_DIR)/devel

View File

@ -16,6 +16,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BIN := Scripts
BUILD_DIR := $(TOP_DIR)/builds/windows
PLATFORM := windows