From 0456354658b844ec9f0a23cce83735a0d0cf21f8 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 24 Jul 2000 06:01:34 +0000 Subject: [PATCH] `make install' is available now. Formatting. --- builds/unix/unix.in | 70 +++++++++++++++++++++++++++++++------- builds/unix/unix.mk | 70 +++++++++++++++++++++++++++++++------- include/freetype/ftimage.h | 4 +-- src/autohint/ahangles.h | 6 ++-- src/autohint/ahglobal.h | 6 ++-- src/autohint/ahglyph.h | 54 ++++++++++++++++++----------- src/autohint/ahtypes.h | 2 ++ 7 files changed, 158 insertions(+), 54 deletions(-) diff --git a/builds/unix/unix.in b/builds/unix/unix.in index a35153e38..9aeea24a4 100644 --- a/builds/unix/unix.in +++ b/builds/unix/unix.in @@ -17,26 +17,41 @@ ifndef TOP TOP := . endif -DELETE := @RMF@ -DELDIR := @RMDIR@ -SEP := / -HOSTSEP := $(SEP) -BUILD := $(TOP)/builds/unix -PLATFORM := unix +DELETE := @RMF@ +DELDIR := @RMDIR@ +SEP := / +HOSTSEP := $(SEP) +BUILD := $(TOP)/builds/unix +PLATFORM := unix +CC := @CC@ -FTSYS_SRC := @FTSYS_SRC@ +INSTALL := @INSTALL@ +INSTALL_DATA := @INSTALL_DATA@ +MKINSTALLDIRS := $(BUILD)/mkinstalldirs + +LIBTOOL := $(BUILD)/libtool + + +# don't use `:=' here since the path stuff will be included after this file +# +FTSYS_SRC = @FTSYS_SRC@ DISTCLEAN += $(BUILD)/config.cache \ $(BUILD)/config.log \ $(BUILD)/config.status \ $(BUILD)/unix.mk \ $(BUILD)/ftconfig.h \ - $(BUILD)/libtool + $(LIBTOOL) +# Standard installation variables. +# prefix := @prefix@ exec_prefix := @exec_prefix@ libdir := @libdir@ +bindir := @bindir@ +includedir := @includedir@ + version_info := @version_info@ @@ -120,9 +135,9 @@ ANSIFLAGS := @XX_ANSIFLAGS@ # # CCraw := $(CC) -CC := $(BUILD)/libtool --mode=compile $(CCraw) +CC := $(LIBTOOL) --mode=compile $(CCraw) -# linker flags +# Linker flags. # LDFLAGS := @LDFLAGS@ @@ -134,17 +149,45 @@ ifdef BUILD_FREETYPE # include $(TOP)/builds/freetype.mk + # The cleanup targets. # clean_freetype: clean_freetype_unix distclean_freetype: distclean_freetype_unix + + # Unix installation and deinstallation targets. + install: $(FT_LIBRARY) + $(MKINSTALLDIRS) $(libdir) \ + $(includedir)/freetype/config \ + $(includedir)/freetype/internal + $(LIBTOOL) --mode=install $(INSTALL) $(FT_LIBRARY) $(libdir) + -for P in $(PUBLIC_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype ; \ + done + -for P in $(BASE_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype/internal ; \ + done + -for P in $(CONFIG_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype/config ; \ + done + + uninstall: + -$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/$(LIBRARY).$A + -$(DELETE) $(includedir)/freetype/config/* + -$(DELDIR) $(includedir)/freetype/config + -$(DELETE) $(includedir)/freetype/internal/* + -$(DELDIR) $(includedir)/freetype/internal + -$(DELETE) $(includedir)/freetype/* + -$(DELDIR) $(includedir)/freetype + + # Unix cleaning and distclean rules. # clean_freetype_unix: -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) - -$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) - -$(DELETE) $(CLEAN) + -$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \ + $(CLEAN) distclean_freetype_unix: clean_freetype_unix -$(DELETE) $(FT_LIBRARY) @@ -152,9 +195,10 @@ ifdef BUILD_FREETYPE -$(DELDIR) $(OBJ_DIR)/.libs -$(DELETE) *.orig *~ core *.core $(DISTCLEAN) + # Librarian to use to build the library # - FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CCraw) + FT_LIBRARIAN := $(LIBTOOL) --mode=link $(CCraw) # This final rule is used to link all object files into a single library. diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk index 792a9d7d8..d5b07ed9a 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -17,26 +17,41 @@ ifndef TOP TOP := . endif -DELETE := rm -f -DELDIR := rmdir -SEP := / -HOSTSEP := $(SEP) -BUILD := $(TOP)/builds/unix -PLATFORM := unix +DELETE := rm -f +DELDIR := rmdir +SEP := / +HOSTSEP := $(SEP) +BUILD := $(TOP)/builds/unix +PLATFORM := unix +CC := gcc -FTSYS_SRC := $(BUILD)/ftsystem.c +INSTALL := /usr/bin/ginstall -c +INSTALL_DATA := ${INSTALL} -m 644 +MKINSTALLDIRS := $(BUILD)/mkinstalldirs + +LIBTOOL := $(BUILD)/libtool + + +# don't use `:=' here since the path stuff will be included after this file +# +FTSYS_SRC = $(BUILD)/ftsystem.c DISTCLEAN += $(BUILD)/config.cache \ $(BUILD)/config.log \ $(BUILD)/config.status \ $(BUILD)/unix.mk \ $(BUILD)/ftconfig.h \ - $(BUILD)/libtool + $(LIBTOOL) +# Standard installation variables. +# prefix := /usr/local exec_prefix := ${prefix} libdir := ${exec_prefix}/lib +bindir := ${exec_prefix}/bin +includedir := ${prefix}/include + version_info := 6:0:0 @@ -120,9 +135,9 @@ ANSIFLAGS := -pedantic -ansi # # CCraw := $(CC) -CC := $(BUILD)/libtool --mode=compile $(CCraw) +CC := $(LIBTOOL) --mode=compile $(CCraw) -# linker flags +# Linker flags. # LDFLAGS := @@ -134,17 +149,45 @@ ifdef BUILD_FREETYPE # include $(TOP)/builds/freetype.mk + # The cleanup targets. # clean_freetype: clean_freetype_unix distclean_freetype: distclean_freetype_unix + + # Unix installation and deinstallation targets. + install: $(FT_LIBRARY) + $(MKINSTALLDIRS) $(libdir) \ + $(includedir)/freetype/config \ + $(includedir)/freetype/internal + $(LIBTOOL) --mode=install $(INSTALL) $(FT_LIBRARY) $(libdir) + -for P in $(PUBLIC_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype ; \ + done + -for P in $(BASE_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype/internal ; \ + done + -for P in $(CONFIG_H) ; do \ + $(INSTALL_DATA) $$P $(includedir)/freetype/config ; \ + done + + uninstall: + -$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/$(LIBRARY).$A + -$(DELETE) $(includedir)/freetype/config/* + -$(DELDIR) $(includedir)/freetype/config + -$(DELETE) $(includedir)/freetype/internal/* + -$(DELDIR) $(includedir)/freetype/internal + -$(DELETE) $(includedir)/freetype/* + -$(DELDIR) $(includedir)/freetype + + # Unix cleaning and distclean rules. # clean_freetype_unix: -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) - -$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) - -$(DELETE) $(CLEAN) + -$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \ + $(CLEAN) distclean_freetype_unix: clean_freetype_unix -$(DELETE) $(FT_LIBRARY) @@ -152,9 +195,10 @@ ifdef BUILD_FREETYPE -$(DELDIR) $(OBJ_DIR)/.libs -$(DELETE) *.orig *~ core *.core $(DISTCLEAN) + # Librarian to use to build the library # - FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CCraw) + FT_LIBRARIAN := $(LIBTOOL) --mode=link $(CCraw) # This final rule is used to link all object files into a single library. diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 71d6ca889..4dd1c3d21 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -588,8 +588,8 @@ /* a a bitmap. This section contains the public API for rasters. */ /* */ /* Note that in FreeType 2, all rasters are now encapsulated within */ - /* specific modules called "renderers". See */ - /* for more details on renderers. */ + /* specific modules called `renderers'. See `freetype/ftrender.h' for */ + /* more details on renderers. */ /* */ /*************************************************************************/ diff --git a/src/autohint/ahangles.h b/src/autohint/ahangles.h index d88d02acd..4eb36bf4d 100644 --- a/src/autohint/ahangles.h +++ b/src/autohint/ahangles.h @@ -20,8 +20,8 @@ /***************************************************************************/ -#ifndef AGANGLES_H -#define AGANGLES_H +#ifndef AHANGLES_H +#define AHANGLES_H #ifdef FT_FLAT_COMPILE @@ -57,7 +57,7 @@ AH_Angle ah_angle( FT_Vector* v ); -#endif /* AGANGLES_H */ +#endif /* AHANGLES_H */ /* END */ diff --git a/src/autohint/ahglobal.h b/src/autohint/ahglobal.h index 43e3c01f4..79e73586f 100644 --- a/src/autohint/ahglobal.h +++ b/src/autohint/ahglobal.h @@ -20,8 +20,8 @@ /***************************************************************************/ -#ifndef AGGLOBAL_H -#define AGGLOBAL_H +#ifndef AHGLOBAL_H +#define AHGLOBAL_H #ifdef FT_FLAT_COMPILE @@ -46,7 +46,7 @@ FT_Error ah_hinter_compute_globals( AH_Hinter* hinter ); -#endif /* AGGLOBAL_H */ +#endif /* AHGLOBAL_H */ /* END */ diff --git a/src/autohint/ahglyph.h b/src/autohint/ahglyph.h index 801d9b637..66fd5e315 100644 --- a/src/autohint/ahglyph.h +++ b/src/autohint/ahglyph.h @@ -2,31 +2,39 @@ /* */ /* ahglyph.h */ /* */ -/* routines used to load and analyze a given glyph before hinting */ +/* Routines used to load and analyze a given glyph before hinting */ +/* (specification). */ /* */ -/* Copyright 2000: Catharon Productions Inc. */ +/* Copyright 2000 Catharon Productions Inc. */ /* Author: David Turner */ /* */ /* This file is part of the Catharon Typography Project and shall only */ /* be used, modified, and distributed under the terms of the Catharon */ /* Open Source License that should come with this file under the name */ -/* "CatharonLicense.txt". By continuing to use, modify, or distribute */ +/* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ -/* Note that this license is compatible with the FreeType license */ +/* Note that this license is compatible with the FreeType license. */ /* */ /***************************************************************************/ -#ifndef AGGLYPH_H -#define AGGLYPH_H + + +#ifndef AHGLYPH_H +#define AHGLYPH_H #ifdef FT_FLAT_COMPILE + #include "ahtypes.h" + #else + #include + #endif - typedef enum AH_UV_ + + typedef enum AH_UV_ { ah_uv_fxy, ah_uv_fyx, @@ -35,10 +43,11 @@ ah_uv_ox, ah_uv_oy, ah_uv_yx, - ah_uv_xy /* should always be last !! */ + ah_uv_xy /* should always be last! */ } AH_UV; + LOCAL_DEF void ah_setup_uv( AH_Outline* outline, AH_UV source ); @@ -47,33 +56,38 @@ /* AH_Outline functions - they should be typically called in this order */ LOCAL_DEF - FT_Error ah_outline_new( FT_Memory memory, AH_Outline* *aoutline ); + FT_Error ah_outline_new( FT_Memory memory, + AH_Outline** aoutline ); LOCAL_DEF - FT_Error ah_outline_load( AH_Outline* outline, FT_Face face ); + FT_Error ah_outline_load( AH_Outline* outline, + FT_Face face ); LOCAL_DEF - void ah_outline_compute_segments( AH_Outline* outline ); + void ah_outline_compute_segments( AH_Outline* outline ); LOCAL_DEF - void ah_outline_link_segments( AH_Outline* outline ); + void ah_outline_link_segments( AH_Outline* outline ); LOCAL_DEF - void ah_outline_detect_features( AH_Outline* outline ); + void ah_outline_detect_features( AH_Outline* outline ); LOCAL_DEF - void ah_outline_compute_blue_edges( AH_Outline* outline, - AH_Face_Globals* globals ); + void ah_outline_compute_blue_edges( AH_Outline* outline, + AH_Face_Globals* globals ); LOCAL_DEF - void ah_outline_scale_blue_edges( AH_Outline* outline, - AH_Face_Globals* globals ); + void ah_outline_scale_blue_edges( AH_Outline* outline, + AH_Face_Globals* globals ); LOCAL_DEF - void ah_outline_save( AH_Outline* outline, AH_Loader* loader ); + void ah_outline_save( AH_Outline* outline, AH_Loader* loader ); LOCAL_DEF - void ah_outline_done( AH_Outline* outline ); + void ah_outline_done( AH_Outline* outline ); -#endif /* AGGLYPH_H */ +#endif /* AHGLYPH_H */ + + +/* END */ diff --git a/src/autohint/ahtypes.h b/src/autohint/ahtypes.h index 6fe6ba81e..e73b55cb9 100644 --- a/src/autohint/ahtypes.h +++ b/src/autohint/ahtypes.h @@ -137,6 +137,8 @@ ah_dir_none = 4, ah_dir_right = 1, ah_dir_left = -1, + ah_dir_up_and_down = 0, + ah_dir_left_and_right = 0, ah_dir_up = 2, ah_dir_down = -2