shithub: freetype+ttf2subf

Download patch

ref: e0d1559591e7b49fe638775536fa66100f1b2163
parent: b80d85fe9ed3b0cf96d03dcfd7d1e1f149c2b718
author: Werner Lemberg <[email protected]>
date: Wed May 10 09:44:47 EDT 2006

* builds/freetype.mk (refdoc): Write-protect the `docmaker'
directory to suppress generation of .pyc files.  According to the
Python docs there isn't a more elegant solution (currently).

* builds/toplevel.mk (dist): New target which builds .tar.gz,
.tar.bz2, and .zip files.  Note that the version number is still
hard-coded.
(do-dist): Sub-target of `dist'.
(CONFIG_GUESS, CONFIG_SUB): New variables.
(.PHONY): Updated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,17 @@
 	given an empty, un-mmap()able file.  Reported and suggested fix in
 	Savannah bug #16555.
 
+	* builds/freetype.mk (refdoc): Write-protect the `docmaker'
+	directory to suppress generation of .pyc files.  According to the
+	Python docs there isn't a more elegant solution (currently).
+
+	* builds/toplevel.mk (dist): New target which builds .tar.gz,
+	.tar.bz2, and .zip files.  Note that the version number is still
+	hard-coded.
+	(do-dist): Sub-target of `dist'.
+	(CONFIG_GUESS, CONFIG_SUB): New variables.
+	(.PHONY): Updated.
+
 2006-05-09  Rajeev Pahuja  <[email protected]>
 
 	* builds/win32/visualc/freetype.sln,
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -267,7 +267,11 @@
 	$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
 
 
+# We write-protect the docmaker directory to suppress generation
+# of .pyc files.
+#
 refdoc:
+	-chmod -w $(SRC_DIR)/tools/docmaker
 	python $(SRC_DIR)/tools/docmaker/docmaker.py \
                --prefix=ft2                          \
                --title=FreeType-2.2.1                \
@@ -275,6 +279,7 @@
                $(PUBLIC_DIR)/*.h                     \
                $(PUBLIC_DIR)/config/*.h              \
                $(PUBLIC_DIR)/cache/*.h
+	-chmod +w $(SRC_DIR)/tools/docmaker
 
 
 .PHONY: clean_project_std distclean_project_std
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -34,7 +34,7 @@
 # details on host platform detection and library builds.
 
 
-.PHONY: all setup distclean modules
+.PHONY: all dist distclean modules setup
 
 
 # The `space' variable is used to avoid trailing spaces in defining the
@@ -157,5 +157,77 @@
 
 include $(TOP_DIR)/builds/modules.mk
 
+
+# This target builds the tarballs.
+#
+# Not to be run by a normal user -- there are no attempts to make it
+# generic.
+
+dist:
+	-rm -rf tmp
+	rm -f freetype-2.2.1.tar.gz
+	rm -f freetype-2.2.1.tar.bz2
+	rm -f ft221.zip
+
+	for d in `find . -wholename '*/CVS' -prune \
+	                 -o -type f \
+	                 -o -print` ; do \
+	  mkdir -p tmp/$$d ; \
+	done ;
+
+	currdir=`pwd` ; \
+	for f in `find . -wholename '*/CVS' -prune \
+	                 -o -name .cvsignore \
+	                 -o -type d \
+	                 -o -print` ; do \
+	  ln -s $$currdir/$$f tmp/$$f ; \
+	done
+
+	@# Prevent generation of .pyc files.  Python follows (soft) links if
+	@# the link's directory is write protected, so we have temporarily
+	@# disable write access here too.
+	chmod -w src/tools/docmaker
+
+	cd tmp ; \
+	$(MAKE) devel ; \
+	$(MAKE) do-dist
+
+	chmod +w src/tools/docmaker
+
+	mv tmp freetype-2.2.1
+
+	tar cfh - freetype-2.2.1 \
+	| gzip -c > freetype-2.2.1.tar.gz
+	tar cfh - freetype-2.2.1 \
+	| bzip2 -c > freetype-2.2.1.tar.bz2
+
+	@# Use CR/LF for zip files.
+	zip -lr ft221.zip freetype-2.2.1
+
+	rm -fr freetype-2.2.1
+
+
+# The locations of the latest `config.guess' and `config.sub' versions (from
+# GNU `config' CVS), relative to the `tmp' directory used during `make dist'.
+#
+CONFIG_GUESS = ../../../config/config.guess
+CONFIG_SUB   = ../../../config/config.sub
+
+
+# Don't say `make do-dist'.  Always use `make dist' instead.
+#
+.PHONY: do-dist
+
+do-dist: distclean refdoc
+	@# Without removing the files, `autoconf' and friends follow links.
+	rm -f builds/unix/aclocal.m4
+	rm -r builds/unix/configure.ac
+	rm -r builds/unix/configure
+
+	sh autogen.sh
+	rm -rf builds/unix/autom4te.cache
+
+	cp $(CONFIG_GUESS) builds/unix
+	cp $(CONFIG_SUB) builds/unix
 
 # EOF