File: Makefile.in

package info (click to toggle)
bow 19991122-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,544 kB
  • ctags: 2,987
  • sloc: ansic: 38,660; lisp: 1,072; makefile: 594; perl: 492; yacc: 149; sh: 91
file content (198 lines) | stat: -rw-r--r-- 4,148 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#   @configure_input@
#
#   Makefile for the command-line-argument-processing library, libargp
#   Written by:  Miles Bader <miles@gnu.ai.mit.edu>

SHELL = /bin/sh

#### Start of system configuration section. ####

default: libargp.a

srcdir = @srcdir@
VPATH = @srcdir@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

CC = @CC@

DEFS = @DEFS@
LIBS = @LIBS@
     
# All these are optional.  You can redifine CFLAGS, CPPFLAGS,
# INCLUDEFLAGS and LDFLAGS on the command line however you like.
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDEFLAGS =
LDFLAGS =

prefix = @prefix@
exec_prefix = @exec_prefix@

# Installation locations
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
infodir = $(prefix)/info

#### End of system configuration section. ####

ARGP_VERSION = 0.1

ARGP_H_FILES = \
argp.h

ARGP_C_FILES = \
argp-ba.c \
argp-fmtstream.c \
argp-fs-xinl.c \
argp-help.c \
argp-parse.c \
argp-pv.c \
argp-pvh.c \
argp-xinl.c \
argp.c \
pin.c \
strndup.c

ARGP_O_FILES = $(ARGP_C_FILES:.c=.o)

ARGP_GETOPT_C_FILES = \
getopt.c \
getopt1.c

ARGP_GETOPT_O_FILES = $(ARGP_GETOPT_C_FILES:.c=.o)

ARGP_CHECK_C_FILES = \
argp-ex1.c \
argp-ex2.c \
argp-ex3.c \
argp-ex4.c \
argp-test.c \
tester.c

ARGP_CHECK_O_FILES = $(ARGP_CHECK_C_FILES:.c=.o)
ARGP_CHECK_PROGRAMS = $(ARGP_CHECK_C_FILES:.c=)

DIST_FILES = \
$(ARGP_C_FILES) \
$(ARGP_H_FILES) \
$(ARGP_GETOPT_C_FILES) \
$(ARGP_CHECK_C_FILES) \
ChangeLog \
INSTALL \
Makefile.in \
README \
configure \
configure.in \
install-sh \
mkinstalldirs \
getopt.h \
argp1.h \
argp-fmtstream.h \
argp-namefrob.h

# Rules

# Pattern rule
ALL_CPPFLAGS = $(CPPFLAGS) -I$(srcdir) $(INCLUDEFLAGS) $(DEFS)
ALL_CFLAGS = $(CFLAGS)
.c.o:
	$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $<

all: libargp.a

# Compiling code

libargp.a: $(ARGP_O_FILES) @ARGP_GETOPT_O_FILES@
	$(AR) rc $@ $^
	$(RANLIB) $@

# Compiling the Makefile

Makefile: Makefile.in config.status
	$(SHELL) config.status
config.status: $(srcdir)/configure
	$(SHELL) $(srcdir)/configure --no-create
$(srcdir)/configure: configure.in
	cd $(srcdir); autoconf

# Installing

installdirs:
	$(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)
INSTALL_FILES = libargp.a argp.h
install: $(INSTALL_FILES) installdirs
	rm -f $(libdir)/libargp.a
	cp libargp.a $(libdir)
	$(RANLIB) $(libdir)/libargp.a
	rm -f $(includedir)/argp.h
	cp argp.h $(includedir)

# Compiling examples and test programs
$(ARGP_CHECK_PROGRAMS): libargp.a
	$(CC) -I. $@.c -L. -largp -o $@

checks: $(ARGP_CHECK_PROGRAMS)

# Cleaning

mostlyclean:
	rm -f core *~
clean: mostlyclean
	rm -f *.o libargp.a *.info *.dvi tester
maintainer-clean: clean
	rm -f configure config.log config.cache config.status

# Making a distribution .tar.gz file

# Copy all the dist files into the directory named by $(SNAP)
snap: $(DIST_FILES)
	for file in $(DIST_FILES); do \
	  ln $$file $(SNAP)/$$file ; \
	done

dist: $(DIST_FILES)
	cvs rtag -F release-`tr . - $(ARGP_VERSION)` argp
	echo argp-$(ARGP_VERSION) > .fname
	rm -rf `cat .fname`
	mkdir `cat .fname`
	for file in $(DIST_FILES); do \
	  ln $$file `cat .fname`/$$file ; \
	done
	tar -chvf `cat .fname`.tar `cat .fname`
	rm -f `cat .fname`.tar.gz
	gzip -9 `cat .fname`.tar
	rm -rf `cat .fname` .fname

snapshot: $(DIST_FILES)
	echo argp-`date +%y%m%d` > .fname
	cvs rtag -F snapshot-`cat .fname` argp
	rm -rf `cat .fname`
	mkdir `cat .fname`
	for file in $(DIST_FILES); do \
	  ln $$file $(SNAP)/$$file ; \
	done
	tar -chvf `cat .fname`.tar `cat .fname`
	rm -f `cat .fname`.tar.gz
	gzip -9 `cat .fname`.tar
	rm -rf `cat .fname` .fname

diff: $(DIST_FILES)
	@if [ ! $(OLD) ] ; then \
	  echo You must set OLD to the version number against which to diff ; \
	  exit -1 ; \
	fi
	@if [ ! $(NEW) ] ; then \
	  echo You must set NEW to the version number with which to diff ; \
	  exit -1 ; \
	fi
	gunzip -c argp-$(NEW).tar.gz | (cd /tmp ; tar -xf -)
	gunzip -c argp-$(OLD).tar.gz | (cd /tmp ; tar -xf -)
	rm -f argp-$(OLD)-$(NEW).diff
	-diff -u -r /tmp/argp-$(OLD) /tmp/argp-$(NEW) > argp-$(OLD)-$(NEW).diff
	rm -rf /tmp/argp-$(NEW)
	rm -rf /tmp/argp-$(OLD)