shithub: freetype+ttf2subf

Download patch

ref: dbb93157d595e0e1107383cdf9cc2e1a4f353ce4
parent: 4e7f89e3d77454b60f288443fed1a67fa0abfdff
author: Werner Lemberg <[email protected]>
date: Thu Nov 27 02:20:48 EST 2014

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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2014-11-27  Werner Lemberg  <[email protected]>
 
+	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  <[email protected]>
+
 	* src/tools/docmaker/sources.py (re_bold, re_italic): Use
 	non-grouping parentheses.
 	* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
--- 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 @@
 	@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 @@
 	@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
 
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -297,19 +297,16 @@
   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