Imported from ../bash-2.02.tar.gz.
[platform/upstream/bash.git] / lib / tilde / Makefile.in
1 ## -*- text -*- ####################################################
2 #                                                                  #
3 # Makefile for the GNU Tilde 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 LOCAL_DEFS = @LOCAL_DEFS@
30
31 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
32
33 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
34
35 .c.o:
36         $(CC) -c $(CCFLAGS) $<
37
38 # The name of the library target.
39 LIBRARY_NAME = libtilde.a
40
41 # The C code source files for this library.
42 CSOURCES = $(srcdir)/tilde.c
43
44 # The header files for this library.
45 HSOURCES = $(srcdir)/tilde.h
46
47 OBJECTS = tilde.o
48
49 # The texinfo files which document this library.
50 DOCSOURCE = doc/tilde.texi
51 DOCOBJECT = doc/tilde.dvi
52 DOCSUPPORT = doc/Makefile
53 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
54
55 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
56
57 SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
58
59 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
60
61 ######################################################################
62
63 all: $(LIBRARY_NAME)
64
65 $(LIBRARY_NAME): $(OBJECTS)
66         $(RM) -f $@
67         $(AR) cr $@ $(OBJECTS)
68         -test -n "$(RANLIB)" && $(RANLIB) $@
69
70 documentation: force
71         -(cd doc; $(MAKE) $(MFLAGS))
72
73 force:
74
75 # The rule for 'includes' is written funny so that the if statement
76 # always returns TRUE unless there really was an error installing the
77 # include files.
78 install:
79         $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
80         -test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
81
82 clean:
83         $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
84         -( cd doc && $(MAKE) $(MFLAGS) $@ )
85
86 realclean distclean maintainer-clean: clean
87         -( cd doc && $(MAKE) $(MFLAGS) $@ )
88         $(RM) -f Makefile
89
90 mostlyclean: clean
91         -( cd doc && $(MAKE) $(MFLAGS) $@ )
92
93 ######################################################################
94 #                                                                    #
95 #  Dependencies for the object files which make up this library.     #
96 #                                                                    #
97 ######################################################################
98
99 tilde.o: tilde.h $(topdir)/ansi_stdlib.h
100 tilde.o: $(BUILD_DIR)/config.h
101
102 # Rules for deficient makes, like SunOS and Solaris
103 tilde.o: tilde.c