* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
diff --git a/ChangeLog b/ChangeLog
index 95f0ba1..dd3a3fe 100644
--- 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 <rpahuja@esri.com>
* builds/win32/visualc/freetype.sln,
diff --git a/builds/freetype.mk b/builds/freetype.mk
index 84da09b..2afd8c8 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -267,7 +267,11 @@ dll: $(PROJECT_LIBRARY) exported_symbols
$(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 @@ refdoc:
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
+ -chmod +w $(SRC_DIR)/tools/docmaker
.PHONY: clean_project_std distclean_project_std
diff --git a/builds/toplevel.mk b/builds/toplevel.mk
index 48a454c..6c39e0c 100644
--- 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
@@ -158,4 +158,76 @@ modules:
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