* builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat'

or `type'.

* builds/freetype.mk (version): Extracted from freetype.h, using
GNU make's built-in string functions.
(refdoc): Use $(version) instead of static version number.
This commit is contained in:
Werner Lemberg 2006-12-09 20:01:43 +00:00
parent 4e1d6c0c51
commit b26b314a93
15 changed files with 51 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2006-12-09 Werner Lemberg <wl@gnu.org>
* builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat'
or `type'.
* builds/freetype.mk (version): Extracted from freetype.h, using
GNU make's built-in string functions.
(refdoc): Use $(version) instead of static version number.
2006-12-08 Werner Lemberg <wl@gnu.org>
* builds/toplevel.mk (dist): Extract version number from freetype.h.

View File

@ -14,6 +14,7 @@
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi

View File

@ -16,6 +16,7 @@
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
PLATFORM := beos

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -28,6 +28,7 @@ endif
ifeq ($(PLATFORM),beos)
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
CONFIG_FILE := beos.mk

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2002, 2003 by
# Copyright 1996-2000, 2001, 2002, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -43,6 +43,7 @@
PLATFORM := ansi
DELETE := $(RM)
COPY := cp
CAT := cat
SEP := /
BUILD_CONFIG := $(TOP_DIR)/builds

View File

@ -116,10 +116,12 @@ ifeq ($(PLATFORM),dos)
SEP := /
DELETE := rm
COPY := cp
CAT := cat
setup: std_setup
else
SEP := $(BACKSLASH)
DELETE := del
CAT := type
# Setting COPY is a bit trickier. We can be running DJGPP on some
# Windows NT derivatives, like XP. See builds/win32/detect.mk for

View File

@ -14,6 +14,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/dos
PLATFORM := dos

View File

@ -267,6 +267,29 @@ dll: $(PROJECT_LIBRARY) exported_symbols
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
ifneq ($(findstring refdoc,$(MAKECMDGOALS)),)
# poor man's `sed' emulation with make's built-in string functions
work := $(strip $(shell $(CAT) $(PUBLIC_DIR)/freetype.h))
work := $(subst |,x,$(work))
work := $(subst $(space),|,$(work))
work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
work := $(word 2,$(work))
major := $(subst |,$(space),$(work))
major := $(firstword $(major))
work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
work := $(word 2,$(work))
minor := $(subst |,$(space),$(work))
minor := $(firstword $(minor))
work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
work := $(word 2,$(work))
patch := $(subst |,$(space),$(work))
patch := $(firstword $(patch))
version := $(major).$(minor).$(patch)
endif
# We write-protect the docmaker directory to suppress generation
# of .pyc files.
#
@ -274,7 +297,7 @@ refdoc:
-chmod -w $(SRC_DIR)/tools/docmaker
python $(SRC_DIR)/tools/docmaker/docmaker.py \
--prefix=ft2 \
--title=FreeType-2.2.1 \
--title=FreeType-$(version) \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -29,6 +29,7 @@ ifeq ($(PLATFORM),os2)
COPY := copy
DELETE := del
CAT := type
SEP := $(BACKSLASH)
# gcc-emx by default

View File

@ -14,6 +14,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/os2
PLATFORM := os2

View File

@ -31,6 +31,7 @@ endif # test PLATFORM ansi
ifeq ($(PLATFORM),unix)
COPY := cp
DELETE := rm -f
CAT := cat
# If `devel' is the requested target, we use a special configuration
# file named `unix-dev.mk'. It disables optimization and libtool.

View File

@ -17,6 +17,7 @@ TOP_DIR := $(shell cd $(TOP_DIR); pwd)
DELETE := @RMF@
DELDIR := @RMDIR@
CAT := cat
SEP := /
# this is used for `make distclean' and `make install'

View File

@ -20,6 +20,7 @@ OBJ_DIR := $(shell cd $(OBJ_DIR); pwd)
PLATFORM := unix
DELETE := rm -f
CAT := cat
SEP := /
# we use a special devel ftoption.h

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2004 by
# Copyright 1996-2000, 2003, 2004, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -65,6 +65,7 @@ endif # test PLATFORM ansi
ifeq ($(PLATFORM),win32)
DELETE := del
CAT := type
SEP := $(BACKSLASH)
# Setting COPY is a bit trickier. Plain COPY on NT will not work

View File

@ -14,6 +14,7 @@
DELETE := del
CAT := type
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/win32
PLATFORM := win32