1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

First include is the specification's .h file.

This commit is contained in:
Bruno Haible
2002-11-29 12:52:54 +00:00
parent 96e0406e32
commit bd03d0bce8
9 changed files with 55 additions and 28 deletions

View File

@@ -1,5 +1,13 @@
2002-11-02 Bruno Haible <bruno@clisp.org> 2002-11-02 Bruno Haible <bruno@clisp.org>
* src/version.cc: Include version.h.
* src/Makefile.in (OBJECTS): Reorder.
(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
variables.
(HASH_TABLE_H): Update.
(options.o, read-line.o, keyword.o, keyword-list.o, input.o, search.o,
output.o, main.o): Update dependencies.
* src/vectors.h: Remove file. * src/vectors.h: Remove file.
* src/vectors.cc: Remove file. * src/vectors.cc: Remove file.
* src/search.h: Don't include vectors.h. * src/search.h: Don't include vectors.h.

View File

@@ -61,9 +61,8 @@ SHELL = /bin/sh
VPATH = $(srcdir) VPATH = $(srcdir)
OBJECTS = options.o main.o \ OBJECTS = version.o options.o read-line.o keyword.o keyword-list.o \
hash-table.o bool-array.o read-line.o version.o \ input.o bool-array.o hash-table.o search.o output.o main.o
keyword.o keyword-list.o output.o input.o search.o
LIBS = ../lib/libgp.a @GPERF_LIBM@ LIBS = ../lib/libgp.a @GPERF_LIBM@
CPPFLAGS = -I. -I$(srcdir)/../lib CPPFLAGS = -I. -I$(srcdir)/../lib
@@ -86,33 +85,38 @@ $(TARGETPROG): $(OBJECTS)
# Dependencies. # Dependencies.
CONFIG_H = config.h CONFIG_H = config.h
VERSION_H = version.h VERSION_H = version.h
READ_LINE_H = read-line.h read-line.icc
OPTIONS_H = options.h options.icc OPTIONS_H = options.h options.icc
HASH_TABLE_H = hash-table.h READ_LINE_H = read-line.h read-line.icc
KEYWORD_H = keyword.h
KEYWORD_LIST_H = keyword-list.h $(KEYWORD_H)
INPUT_H = input.h $(READ_LINE_H) $(KEYWORD_LIST_H)
BOOL_ARRAY_H = bool-array.h bool-array.icc $(OPTIONS_H) BOOL_ARRAY_H = bool-array.h bool-array.icc $(OPTIONS_H)
HASH_TABLE_H = hash-table.h $(KEYWORD_H)
SEARCH_H = search.h $(KEYWORD_LIST_H) $(BOOL_ARRAY_H)
OUTPUT_H = output.h $(KEYWORD_LIST_H)
version.o : version.cc $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/version.cc
options.o : options.cc $(OPTIONS_H) $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/options.cc
read-line.o : read-line.cc $(READ_LINE_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/read-line.cc
keyword.o : keyword.cc $(KEYWORD_H) $(OPTIONS_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword.cc
keyword-list.o : keyword-list.cc $(KEYWORD_LIST_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword-list.cc
input.o : input.cc $(INPUT_H) $(OPTIONS_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/input.cc
bool-array.o : bool-array.cc $(BOOL_ARRAY_H) $(OPTIONS_H) bool-array.o : bool-array.cc $(BOOL_ARRAY_H) $(OPTIONS_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/bool-array.cc $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/bool-array.cc
hash-table.o : hash-table.cc $(HASH_TABLE_H) $(OPTIONS_H) hash-table.o : hash-table.cc $(HASH_TABLE_H) $(OPTIONS_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/hash-table.cc $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/hash-table.cc
main.o : main.cc $(OPTIONS_H) $(GEN_PERF_H) $(CONFIG_H) search.o : search.cc $(SEARCH_H) $(OPTIONS_H) $(HASH_TABLE_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/main.cc
options.o : options.cc $(OPTIONS_H) $(VECTORS_H) $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/options.cc
read-line.o : read-line.cc $(READ_LINE_H) $(OPTIONS_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/read-line.cc
version.o : version.cc $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/version.cc
keyword.o : keyword.cc keyword.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword.cc
keyword-list.o : keyword-list.cc keyword-list.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword-list.cc
output.o : output.cc output.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/output.cc
input.o : input.cc input.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/input.cc
search.o : search.cc search.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/search.cc $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/search.cc
output.o : output.cc $(OUTPUT_H) $(OPTIONS_H) $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/output.cc
main.o : main.cc $(OPTIONS_H) $(INPUT_H) $(SEARCH_H) $(OUTPUT_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/main.cc
install : all force install : all force
$(MKINSTALLDIRS) $(DESTDIR)$(bindir) $(MKINSTALLDIRS) $(DESTDIR)$(bindir)

View File

@@ -20,12 +20,14 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "input.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> /* declares exit() */ #include <stdlib.h> /* declares exit() */
#include <string.h> /* declares strncpy(), strchr() */ #include <string.h> /* declares strncpy(), strchr() */
#include <limits.h> /* defines UCHAR_MAX etc. */ #include <limits.h> /* defines UCHAR_MAX etc. */
#include "options.h" #include "options.h"
#include "input.h"
Input::Input (Keyword_Factory *keyword_factory) Input::Input (Keyword_Factory *keyword_factory)
: _factory (keyword_factory) : _factory (keyword_factory)

View File

@@ -20,9 +20,11 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stddef.h> /* Specification. */
#include "keyword-list.h" #include "keyword-list.h"
#include <stddef.h>
/* Constructor. */ /* Constructor. */
Keyword_List::Keyword_List (Keyword *car) Keyword_List::Keyword_List (Keyword *car)
: _cdr (NULL), _car (car) : _cdr (NULL), _car (car)

View File

@@ -20,10 +20,12 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "keyword.h"
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "keyword.h"
#include "options.h" #include "options.h"

View File

@@ -20,12 +20,14 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "options.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> /* declares atoi(), abs(), exit() */ #include <stdlib.h> /* declares atoi(), abs(), exit() */
#include <string.h> /* declares strcmp() */ #include <string.h> /* declares strcmp() */
#include <ctype.h> /* declares isdigit() */ #include <ctype.h> /* declares isdigit() */
#include "getopt.h" #include "getopt.h"
#include "options.h"
#include "version.h" #include "version.h"
/* Global option coordinator for the entire program. */ /* Global option coordinator for the entire program. */

View File

@@ -20,12 +20,14 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "output.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> /* declares strncpy(), strchr() */ #include <string.h> /* declares strncpy(), strchr() */
#include <ctype.h> /* declares isprint() */ #include <ctype.h> /* declares isprint() */
#include <assert.h> /* defines assert() */ #include <assert.h> /* defines assert() */
#include <limits.h> /* defines SCHAR_MAX etc. */ #include <limits.h> /* defines SCHAR_MAX etc. */
#include "output.h"
#include "options.h" #include "options.h"
#include "version.h" #include "version.h"

View File

@@ -20,6 +20,9 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "search.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> /* declares exit(), rand(), srand() */ #include <stdlib.h> /* declares exit(), rand(), srand() */
#include <string.h> /* declares memset(), memcmp() */ #include <string.h> /* declares memset(), memcmp() */
@@ -27,7 +30,6 @@
#include <limits.h> /* defines INT_MIN, INT_MAX */ #include <limits.h> /* defines INT_MIN, INT_MAX */
#include "options.h" #include "options.h"
#include "hash-table.h" #include "hash-table.h"
#include "search.h"
/* Make the hash table 8 times larger than the number of keyword entries. */ /* Make the hash table 8 times larger than the number of keyword entries. */
static const int TABLE_MULTIPLE = 10; static const int TABLE_MULTIPLE = 10;

View File

@@ -21,4 +21,7 @@
If not, write to the Free Software Foundation, Inc., If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Specification. */
#include "version.h"
const char *version_string = "2.7.2"; const char *version_string = "2.7.2";