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