Imported from ../bash-2.03.tar.gz.
[platform/upstream/bash.git] / lib / glob / Makefile.in
1 ## -*- text -*- ####################################################
2 #                                                                  #
3 # Makefile for the GNU Glob Library.                               #
4 #                                                                  #
5 ####################################################################
6
7 srcdir = @srcdir@
8 VPATH = .:@srcdir@
9 topdir = @top_srcdir@
10 BUILD_DIR = @BUILD_DIR@
11
12 INSTALL = @INSTALL@
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_DATA = @INSTALL_DATA@
15
16 CC = @CC@
17 RANLIB = @RANLIB@
18 AR = @AR@
19 ARFLAGS = @ARFLAGS@
20 RM = rm
21 CP = cp
22 MV = mv
23
24 SHELL = @MAKE_SHELL@
25
26 CFLAGS = @CFLAGS@
27 LOCAL_CFLAGS = @LOCAL_CFLAGS@
28 CPPFLAGS = @CPPFLAGS@
29 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
30
31 DEFS = @DEFS@
32 LOCAL_DEFS = @LOCAL_DEFS@
33
34 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
35
36 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
37
38 # Here is a rule for making .o files from .c files that doesn't force
39 # the type of the machine (like -sun3) into the flags.
40 .c.o:
41         $(CC) -c $(CCFLAGS) $<
42
43 # The name of the library target.
44 LIBRARY_NAME = libglob.a
45
46 # The C code source files for this library.
47 CSOURCES = $(srcdir)/glob.c $(srcdir)/fnmatch.c
48
49 # The header files for this library.
50 HSOURCES = $(srcdir)/fnmatch.h
51
52 OBJECTS = glob.o fnmatch.o
53
54 # The texinfo files which document this library.
55 DOCSOURCE = doc/glob.texi
56 DOCOBJECT = doc/glob.dvi
57 DOCSUPPORT = doc/Makefile
58 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
59
60 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
61
62 SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
63
64 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
65
66 ######################################################################
67
68 all: $(LIBRARY_NAME)
69
70 $(LIBRARY_NAME): $(OBJECTS)
71         $(RM) -f $@
72         $(AR) $(ARFLAGS) $@ $(OBJECTS)
73         -test -n "$(RANLIB)" && $(RANLIB) $@
74
75 what-tar:
76         @for file in $(THINGS_TO_TAR); do \
77           echo $(selfdir)$$file; \
78         done
79
80 documentation: force
81         -(cd doc; $(MAKE) $(MFLAGS))
82 force:
83
84 # The rule for 'includes' is written funny so that the if statement
85 # always returns TRUE unless there really was an error installing the
86 # include files.
87 install:
88
89 clean:
90         rm -f $(OBJECTS) $(LIBRARY_NAME)
91         -(cd doc && $(MAKE) $(MFLAGS) $@ )
92
93 realclean distclean maintainer-clean: clean
94         -( cd doc && $(MAKE) $(MFLAGS) $@ )
95         $(RM) -f Makefile
96
97 mostlyclean: clean
98         -( cd doc && $(MAKE) $(MFLAGS) $@ )
99
100 ######################################################################
101 #                                                                    #
102 #  Dependencies for the object files which make up this library.     #
103 #                                                                    #
104 ######################################################################
105
106 fnmatch.o: fnmatch.h
107 fnmatch.o: $(BUILD_DIR)/config.h
108
109 glob.o: $(BUILD_DIR)/config.h
110 glob.o: $(topdir)/bashtypes.h $(topdir)/ansi_stdlib.h $(topdir)/bashansi.h
111 glob.o: $(topdir)/posixstat.h $(topdir)/memalloc.h
112 glob.o: fnmatch.h
113
114 # Rules for deficient makes, like SunOS and Solaris
115 fnmatch.o: fnmatch.c
116 glob.o: glob.c