From dbb93157d595e0e1107383cdf9cc2e1a4f353ce4 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 27 Nov 2014 07:20:48 +0100 Subject: [PATCH] Use better way to disable creation of .pyc files for `make refdoc'. Python 2.6 was released in 2008... * builds/freetype.mk (refdoc): Use python's `-B' option. * builds/detect.mk (std_setup, dos_setup): Mention required python version for `refdoc' target. --- ChangeLog | 11 +++++++++++ builds/detect.mk | 6 +++--- builds/freetype.mk | 19 ++++++++----------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ab5e47a4..9f9f012cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2014-11-27 Werner Lemberg + + Use better way to disable creation of .pyc files for `make refdoc'. + + Python 2.6 was released in 2008... + + * builds/freetype.mk (refdoc): Use python's `-B' option. + + * builds/detect.mk (std_setup, dos_setup): Mention required python + version for `refdoc' target. + 2014-11-27 Werner Lemberg * src/tools/docmaker/sources.py (re_bold, re_italic): Use diff --git a/builds/detect.mk b/builds/detect.mk index ce407baf6..ff4045d5c 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2003, 2006, 2008, 2013 by +# Copyright 1996-2003, 2006, 2008, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -124,7 +124,7 @@ std_setup: @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help." @echo "" @echo "Otherwise, simply type \`$(MAKE)' again to build the library," - @echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)." + @echo "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)." @echo "" @$(COPY) $(CONFIG_RULES) $(CONFIG_MK) @@ -146,7 +146,7 @@ dos_setup: @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help. @type builds$(SEP)newline @echo Otherwise, simply type 'make' again to build the library. - @echo or 'make refdoc' to build the API reference (the latter needs python). + @echo or 'make refdoc' to build the API reference (this needs python >= 2.6). @type builds$(SEP)newline @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul diff --git a/builds/freetype.mk b/builds/freetype.mk index 3f1519eba..8b2e2eace 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -297,19 +297,16 @@ ifneq ($(findstring refdoc,$(MAKECMDGOALS)),) version := $(major).$(minor).$(patch) endif -# We write-protect the docmaker directory to suppress generation -# of .pyc files. +# Option `-B' disables generation of .pyc files (available since python 2.6) # refdoc: - -chmod -w $(SRC_DIR)/tools/docmaker - python $(SRC_DIR)/tools/docmaker/docmaker.py \ - --prefix=ft2 \ - --title=FreeType-$(version) \ - --output=$(DOC_DIR) \ - $(PUBLIC_DIR)/*.h \ - $(PUBLIC_DIR)/config/*.h \ - $(PUBLIC_DIR)/cache/*.h - -chmod +w $(SRC_DIR)/tools/docmaker + python -B $(SRC_DIR)/tools/docmaker/docmaker.py \ + --prefix=ft2 \ + --title=FreeType-$(version) \ + --output=$(DOC_DIR) \ + $(PUBLIC_DIR)/*.h \ + $(PUBLIC_DIR)/config/*.h \ + $(PUBLIC_DIR)/cache/*.h .PHONY: clean_project_std distclean_project_std