Imported from ../bash-1.14.7.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 RM = rm
20 CP = cp
21 MV = mv
22
23 CFLAGS = @CFLAGS@
24 LOCAL_CFLAGS = @LOCAL_CFLAGS@
25 CPPFLAGS = @CPPFLAGS@
26 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
27
28 DEFS = @DEFS@
29
30 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
31
32 CCFLAGS = $(DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
33
34 # Here is a rule for making .o files from .c files that doesn't force
35 # the type of the machine (like -sun3) into the flags.
36 .c.o:
37         $(CC) -c $(CCFLAGS) $<
38
39 # The name of the library target.
40 LIBRARY_NAME = libglob.a
41
42 # The C code source files for this library.
43 CSOURCES = $(srcdir)/glob.c $(srcdir)/fnmatch.c
44
45 # The header files for this library.
46 HSOURCES = $(srcdir)/fnmatch.h
47
48 OBJECTS = glob.o fnmatch.o
49
50 # The texinfo files which document this library.
51 DOCSOURCE = doc/glob.texi
52 DOCOBJECT = doc/glob.dvi
53 DOCSUPPORT = doc/Makefile
54 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
55
56 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
57
58 SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
59
60 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
61
62 ######################################################################
63
64 all: $(LIBRARY_NAME)
65
66 $(LIBRARY_NAME): $(OBJECTS)
67         $(RM) -f $@
68         $(AR) cr $@ $(OBJECTS)
69         -test -n "$(RANLIB)" && $(RANLIB) $@
70
71 what-tar:
72         @for file in $(THINGS_TO_TAR); do \
73           echo $(selfdir)$$file; \
74         done
75
76 documentation: force
77         -(cd doc; $(MAKE) $(MFLAGS))
78 force:
79
80 # The rule for 'includes' is written funny so that the if statement
81 # always returns TRUE unless there really was an error installing the
82 # include files.
83 install:
84
85 clean:
86         rm -f $(OBJECTS) $(LIBRARY_NAME)
87         -(cd doc && $(MAKE) $(MFLAGS) $@ )
88
89 realclean distclean maintainer-clean: clean
90         -( cd doc && $(MAKE) $(MFLAGS) $@ )
91         $(RM) -f Makefile
92
93 mostlyclean: clean
94         -( cd doc && $(MAKE) $(MFLAGS) $@ )
95
96 ######################################################################
97 #                                                                    #
98 #  Dependencies for the object files which make up this library.     #
99 #                                                                    #
100 ######################################################################
101
102 fnmatch.o: fnmatch.c fnmatch.h
103
104 fnmatch.o: $(BUILD_DIR)/config.h
105 glob.o: $(BUILD_DIR)/config.h