Commit 4e1d6c0c518caae87c1285b9723d86b27d58fa67

Werner Lemberg 2006-12-09T08:20:37

* builds/toplevel.mk (dist): Extract version number from freetype.h.

diff --git a/ChangeLog b/ChangeLog
index 6e89515..bc589d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-12-08  Werner Lemberg  <wl@gnu.org>
+
+	* builds/toplevel.mk (dist): Extract version number from freetype.h.
+
 2006-12-08  Vladimir Volovich  <vvv@vsu.ru>
 
 	* src/tools/apinames (State): Remove final comma in structure -- xlc
diff --git a/ChangeLog.21 b/ChangeLog.21
index 0801172..fddb130 100644
--- a/ChangeLog.21
+++ b/ChangeLog.21
@@ -2758,7 +2758,7 @@
 	Add vertical phantom points.
 
 	* include/freetype/internal/tttypes.h (TT_LoaderRec): Add
-	`top_bearing', `vadvance', `pp3, and `pp4'.
+	`top_bearing', `vadvance', `pp3', and `pp4'.
 
 	* src/autofit/afloader.c (af_loader_load_g): Handle two more points.
 
diff --git a/builds/toplevel.mk b/builds/toplevel.mk
index c22defd..f8306a0 100644
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -163,11 +163,22 @@ include $(TOP_DIR)/builds/modules.mk
 # Not to be run by a normal user -- there are no attempts to make it
 # generic.
 
+ifneq ($(findstring dist,$(MAKECMDGOALS)),)
+  FT_H := include/freetype/freetype.h
+
+  major := $(shell sed -n 's/.*FREETYPE_MAJOR.*\([0-9]\+\)/\1/p' < $(FT_H))
+  minor := $(shell sed -n 's/.*FREETYPE_MINOR.*\([0-9]\+\)/\1/p' < $(FT_H))
+  patch := $(shell sed -n 's/.*FREETYPE_PATCH.*\([0-9]\+\)/\1/p' < $(FT_H))
+
+  version    := $(major).$(minor).$(patch)
+  winversion := $(major)$(minor)$(patch)
+endif
+
 dist:
 	-rm -rf tmp
-	rm -f freetype-2.2.1.tar.gz
-	rm -f freetype-2.2.1.tar.bz2
-	rm -f ft221.zip
+	rm -f freetype-$(version).tar.gz
+	rm -f freetype-$(version).tar.bz2
+	rm -f ft$(winversion).zip
 
 	for d in `find . -wholename '*/CVS' -prune \
 	                 -o -type f \
@@ -194,17 +205,17 @@ dist:
 
 	chmod +w src/tools/docmaker
 
-	mv tmp freetype-2.2.1
+	mv tmp freetype-$(version)
 
-	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
+	tar cfh - freetype-$(version) \
+	| gzip -c > freetype-$(version).tar.gz
+	tar cfh - freetype-$(version) \
+	| bzip2 -c > freetype-$(version).tar.bz2
 
 	@# Use CR/LF for zip files.
-	zip -lr ft221.zip freetype-2.2.1
+	zip -lr ft$(winversion).zip freetype-$(version)
 
-	rm -fr freetype-2.2.1
+	rm -fr freetype-$(version)
 
 
 # The locations of the latest `config.guess' and `config.sub' versions (from
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index c49d8fc..a91eb72 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -414,7 +414,7 @@ FT_BEGIN_HEADER
   /*                                                                    */
   /* Useful to optimize access to memory-based streams transparently.   */
   /*                                                                    */
-  /* All extracted frames must be `freed` with a call to the function   */
+  /* All extracted frames must be `freed' with a call to the function   */
   /* FT_Stream_ReleaseFrame().                                          */
   /*                                                                    */
   FT_BASE( FT_Error )
diff --git a/src/pcf/README b/src/pcf/README
index 75f49e1..0139041 100644
--- a/src/pcf/README
+++ b/src/pcf/README
@@ -13,11 +13,11 @@ Glyph images are loaded into memory only on demand, thus leading to a small
 memory footprint.
 
 Informations on the PCF font format can only be worked out from
-``pcfread.c'', and ``pcfwrite.c'', to be found, for instance, in the XFree86
+`pcfread.c', and `pcfwrite.c', to be found, for instance, in the XFree86
 (www.xfree86.org) source tree (xc/lib/font/bitmap/).
 
 Many good bitmap fonts in bdf format come with XFree86: they can be
-compiled into the pcf format using the ``bdftopcf'' utility.
+compiled into the pcf format using the `bdftopcf' utility.
 
 
 Supported hardware
@@ -50,7 +50,7 @@ client application the work of interpreting them.  For instance:
   if ((pcfface->charset_registry == "ISO10646") && 
         (pcfface->charset_encoding) == "1")) [..]
 
-Thus the driver always export ``ft_encoding_none'' as
+Thus the driver always export `ft_encoding_none' as
 face->charmap.encoding.  FT_Get_Char_Index() behavior is unmodified, that
 is, it converts the ULong value given as argument into the corresponding
 glyph number.