Skip to content

Commit fae3820

Browse files
committed
Simplify header file hierarchy.
This large patch changes the header file directory layout from `include/freetype/...' to `include/...', effectively removing one level. Since the file `ft2build.h' is also located in `include' (and it stays there even after installation), all FreeType header files are now in a single directory. Applications that use (a) `freetype-config' or FreeType's `pkg-config' file to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. * include/freetype/*: Move up to... * include/*: ... this directory. * builds/amiga/include/freetype/*: Move up to... * builds/amiga/include/*: ... this directory. */*: Essentially do `s@/freetype/@/@' where appropriate. * CMakeList.txt: Simplify. * builds/unix/freetype-config.in, builds/unix/freetype2.in: For `--cflags', return a single directory. * builds/unix/install.mk (install): No longer try to remove `cache' and `internal' subdirectories; instead, remove the `freetype' subdirectory.
1 parent ea5c781 commit fae3820

File tree

138 files changed

+514
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+514
-515
lines changed

CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ add_definitions(-DFT2_BUILD_LIBRARY)
4949

5050
# Specify library include directories
5151
include_directories("${PROJECT_SOURCE_DIR}/include")
52-
include_directories("${PROJECT_SOURCE_DIR}/include/freetype")
5352

5453
# Create the configuration file
5554
message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include.")
@@ -129,14 +128,8 @@ include_directories("src/psnames")
129128
add_library(freetype ${BASE_SRCS})
130129

131130
# Installations
132-
install(FILES ${PROJECT_SOURCE_DIR}/include/ft2build.h
133-
DESTINATION include
134-
)
135-
# Is this next needed?
136-
install(FILES ${PROJECT_BINARY_DIR}/include/ftconfig.h
137-
DESTINATION include
138-
)
139-
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/freetype
131+
# Note the trailing slash in the argument to the `DIRECTORY' directive
132+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
140133
DESTINATION include/freetype2
141134
PATTERN "internal" EXCLUDE
142135
)

ChangeLog

+35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2013-11-13 Werner Lemberg <[email protected]>
2+
3+
Simplify header file hierarchy.
4+
5+
This large patch changes the header file directory layout from
6+
`include/freetype/...' to `include/...', effectively removing one
7+
level. Since the file `ft2build.h' is also located in `include'
8+
(and it stays there even after installation), all FreeType header
9+
files are now in a single directory.
10+
11+
Applications that use (a) `freetype-config' or FreeType's
12+
`pkg-config' file to get the include directory for the compiler, and
13+
(b) the documented way for header inclusion like
14+
15+
#include <ft2build.h>
16+
#include FT_FREETYPE_H
17+
...
18+
19+
don't need any change to the source code.
20+
21+
* include/freetype/*: Move up to...
22+
* include/*: ... this directory.
23+
24+
* builds/amiga/include/freetype/*: Move up to...
25+
* builds/amiga/include/*: ... this directory.
26+
27+
*/*: Essentially do `s@/freetype/@/@' where appropriate.
28+
29+
* CMakeList.txt: Simplify.
30+
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
31+
`--cflags', return a single directory.
32+
* builds/unix/install.mk (install): No longer try to remove `cache'
33+
and `internal' subdirectories; instead, remove the `freetype'
34+
subdirectory.
35+
136
2013-11-12 Werner Lemberg <[email protected]>
237

338
[truetype] Fix last `truetype' commit.

Jamfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FreeType 2 top Jamfile.
22
#
3-
# Copyright 2001-2011 by
3+
# Copyright 2001-2011, 2013 by
44
# David Turner, Robert Wilhelm, and Werner Lemberg.
55
#
66
# This file is part of the FreeType project, and may only be used, modified,
@@ -140,9 +140,9 @@ DEFINES += FT2_BUILD_LIBRARY ;
140140
# FT2_MULTI = true ;
141141

142142

143-
# The file <freetype/config/ftheader.h> is used to define macros that are
144-
# later used in #include statements. It needs to be parsed in order to
145-
# record these definitions.
143+
# The file <config/ftheader.h> is used to define macros that are later used
144+
# in #include statements. It needs to be parsed in order to record these
145+
# definitions.
146146
#
147147
HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
148148
HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
@@ -177,7 +177,7 @@ actions GenExportSymbols1 bind APINAMES
177177
$(APINAMES) $(2) > $(1)
178178
}
179179

180-
GenExportSymbols ftexport.sym : include/freetype include/freetype/cache ;
180+
GenExportSymbols ftexport.sym : include include/cache ;
181181

182182
# Test files (hinter debugging). Only used by FreeType developers.
183183
#
@@ -195,7 +195,7 @@ rule RefDoc
195195

196196
actions RefDoc
197197
{
198-
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.0 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
198+
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.0 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
199199
}
200200

201201
RefDoc refdoc ;

autogen.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
3+
# Copyright 2005-2010, 2013 by
44
# David Turner, Robert Wilhelm, and Werner Lemberg.
55
#
66
# This file is part of the FreeType project, and may only be used, modified,
@@ -139,7 +139,7 @@ check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4
139139
check_tool_version $AUTOCONF autoconf AUTOCONF 2.62
140140

141141
# This sets freetype_major, freetype_minor, and freetype_patch.
142-
eval `sed -nf version.sed include/freetype/freetype.h`
142+
eval `sed -nf version.sed include/freetype.h`
143143

144144
# We set freetype-patch to an empty value if it is zero.
145145
if test "$freetype_patch" = ".0"; then

builds/amiga/README

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
README for the builds/amiga subdirectory.
33

4-
Copyright 2005 by
4+
Copyright 2005, 2013 by
55
Werner Lemberg and Detlef W�rkner.
66

77
This file is part of the FreeType project, and may only be used, modified,
@@ -51,8 +51,8 @@ directory. The results are:
5151

5252
- ftdebug.o, an object module containing the standard version of the
5353
debugging code which uses vprintf() and exit() (not pure).
54-
Debugging can be turned on in FT:include/freetype/config/ftoption.h
55-
and with FT_SetTraceLevel().
54+
Debugging can be turned on in FT:include/config/ftoption.h and with
55+
FT_SetTraceLevel().
5656

5757
- ftdebugpure.o, an object module containing the pure version of the
5858
debugging code which uses KVPrintf() from lib:debug.lib and no
@@ -64,15 +64,14 @@ directory. The results are:
6464
ftsystem.o would force ALL FreeType2 modules to be linked to your
6565
program, I decided to use a different scheme: You must #include
6666
FT:src/base/ftinit.c in your sourcecode and specify with #define
67-
statements which modules you need. See
68-
include/freetype/config/ftmodule.h.
67+
statements which modules you need. See include/config/ftmodule.h.
6968

7069

7170
To use in your own programs:
7271

7372
- Insert the #define and #include statements from top of
74-
include/freetype/config/ftmodule.h in your source code and uncomment
75-
the #define statements for the FreeType2 modules you need.
73+
include/config/ftmodule.h in your source code and uncomment the
74+
#define statements for the FreeType2 modules you need.
7675

7776
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
7877
calling the FreeType2 functions, because the link library and the

builds/amiga/include/freetype/config/ftconfig.h renamed to builds/amiga/include/config/ftconfig.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* */
55
/* Amiga-specific configuration file (specification only). */
66
/* */
7-
/* Copyright 2005, 2006, 2007 by */
7+
/* Copyright 2005-2007, 2013 by */
88
/* Werner Lemberg and Detlef Würkner. */
99
/* */
1010
/* This file is part of the FreeType project, and may only be used, */
@@ -34,9 +34,9 @@
3434
/* Now include the original file */
3535
#ifndef __MORPHOS__
3636
#ifdef __SASC
37-
#include "FT:include/freetype/config/ftconfig.h"
37+
#include "FT:include/config/ftconfig.h"
3838
#else
39-
#include "/FT/include/freetype/config/ftconfig.h"
39+
#include "/FT/include/config/ftconfig.h"
4040
#endif
4141
#else
4242
/* We must define that, it seems that
@@ -45,7 +45,7 @@
4545
* binaries from http://www.morphos.de)
4646
*/
4747
#define _LIBC_LIMITS_H_
48-
#include "/FT/include/freetype/config/ftconfig.h"
48+
#include "/FT/include/config/ftconfig.h"
4949
#endif
5050

5151
/*

builds/amiga/makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77

8-
# Copyright 2005, 2006, 2007, 2009 by
8+
# Copyright 2005-2007, 2009, 2013 by
99
# Werner Lemberg and Detlef Würkner.
1010
#
1111
# This file is part of the FreeType project, and may only be used, modified,
@@ -43,7 +43,7 @@
4343
#
4444
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
4545
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
46-
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
46+
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
4747

4848
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
4949

builds/amiga/makefile.os4

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66

7-
# Copyright 2005, 2006, 2007, 2009 by
7+
# Copyright 2005-2007, 2009, 2013 by
88
# Werner Lemberg and Detlef W�rkner.
99
#
1010
# This file is part of the FreeType project, and may only be used, modified,
@@ -40,7 +40,7 @@
4040
#
4141
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
4242
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
43-
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
43+
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
4444

4545
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
4646

builds/amiga/smakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55

6-
# Copyright 2005,2006, 2007, 2009 by
6+
# Copyright 2005-2007, 2009, 2013 by
77
# Werner Lemberg and Detlef W�rkner.
88
#
99
# This file is part of the FreeType project, and may only be used, modified,
@@ -40,7 +40,7 @@
4040
#
4141
# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
4242
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
43-
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
43+
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
4444

4545
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o ftgasp.o \
4646
ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o ftpatent.o ftpfr.o \

builds/amiga/src/base/ftdebug.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* */
55
/* Debugging and logging component for amiga (body). */
66
/* */
7-
/* Copyright 1996-2001, 2002, 2004, 2005, 2013 by */
7+
/* Copyright 1996-2002, 2004, 2005, 2013 by */
88
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
99
/* */
1010
/* This file is part of the FreeType project, and may only be used, */
@@ -176,7 +176,7 @@
176176
/* the memory and stream components which are set to 7 and 5, */
177177
/* respectively. */
178178
/* */
179-
/* See the file <include/freetype/internal/fttrace.h> for details of the */
179+
/* See the file <include/internal/fttrace.h> for details of the */
180180
/* available toggle names. */
181181
/* */
182182
/* The level must be between 0 and 7; 0 means quiet (except for serious */

builds/detect.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55

6-
# Copyright 1996-2000, 2001, 2002, 2003, 2006, 2008 by
6+
# Copyright 1996-2003, 2006, 2008, 2013 by
77
# David Turner, Robert Wilhelm, and Werner Lemberg.
88
#
99
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,8 +17,8 @@
1717
# the following variables:
1818
#
1919
# BUILD_DIR The configuration and system-specific directory. Usually
20-
# `freetype/builds/$(PLATFORM)' but can be different for
21-
# custom builds of the library.
20+
# `builds/$(PLATFORM)' but can be different for custom builds
21+
# of the library.
2222
#
2323
# The following variables must be defined in system specific `detect.mk'
2424
# files:

builds/freetype.mk

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ BASE_DIR := $(SRC_DIR)/base
9797

9898
# Other derived directories.
9999
#
100-
PUBLIC_DIR := $(TOP_DIR)/include/freetype
100+
PUBLIC_DIR := $(TOP_DIR)/include
101101
INTERNAL_DIR := $(PUBLIC_DIR)/internal
102102
SERVICES_DIR := $(INTERNAL_DIR)/services
103103
CONFIG_DIR := $(PUBLIC_DIR)/config
@@ -116,8 +116,8 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
116116
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
117117
# before the standard include list. Porters are then able to
118118
# put their own version of some of the FreeType components
119-
# in the `freetype/builds/<system>' directory, as these
120-
# files will override the default sources.
119+
# in the `builds/<system>' directory, as these files will
120+
# override the default sources.
121121
#
122122
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
123123
$(DEVEL_DIR) \
@@ -178,7 +178,7 @@ PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
178178
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
179179
$(wildcard $(SERVICES_DIR)/*.h)
180180
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
181-
$(wildcard $(BUILD_DIR)/freetype/config/*.h) \
181+
$(wildcard $(BUILD_DIR)/config/*.h) \
182182
$(FTMODULE_H) \
183183
$(FTOPTION_H)
184184
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)

0 commit comments

Comments
 (0)