-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
224 lines (174 loc) · 6.66 KB
/
Makefile.in
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Makefile for units, a program for units conversion
#
# Copyright (C) 1996, 1997, 1999, 2005, 2006 Free Software Foundation, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#
# This program was written by Adrian Mariano (adrian@cam.cornell.edu)
#
SHELL = /bin/sh
exec_prefix = @exec_prefix@
prefix = @prefix@
srcdir = @srcdir@
CC = @CC@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
LDFLAGS = @LDFLAGS@
LIBS= @LIBS@
VPATH = @srcdir@
datarootdir = @datarootdir@
datadir = @datadir@
bindir = @bindir@
infodir = @infodir@
mandir = @mandir@
transform=@program_transform_name@
DEFS = -DUNITSFILE=\"@UDAT@units.dat\" @DEFIS@ @DEFS@
CFLAGS = @CFLAGS@
OBJECTS = units.@OBJEXT@ parse.tab.@OBJEXT@ getopt.@OBJEXT@ getopt1.@OBJEXT@ @STRFUNC@
.SUFFIXES:
.SUFFIXES: .c .@OBJEXT@
.c.@OBJEXT@:
$(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c $<
# %.@OBJEXT@: %.c
# $(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c %.c
DISTFILES = README ChangeLog units.info units.doc getopt1.c units.dvi \
Makefile.in units.c getopt.c getopt.h units.dat units.man units.texinfo \
configure.ac configure strfunc.c COPYING Makefile.dos install-sh \
mkinstalldirs NEWS texi2man INSTALL \
parse.tab.c parse.y units.h Makefile.OS2 makeobjs.cmd README.OS2
all: units@EXEEXT@ units.1 units.info
units.@OBJEXT@: units.c
parse.tab.c: parse.y
bison parse.y
parse.tab.@OBJEXT@: parse.tab.c
units@EXEEXT@: $(OBJECTS)
$(CC) $(LDFLAGS) -o units $(OBJECTS) $(LIBS)
install: units@EXEEXT@ units.dat install-doc
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)
$(INSTALL_PROGRAM) units $(DESTDIR)$(bindir)/`echo units|sed '$(transform)'`
$(INSTALL_DATA) $(srcdir)/units.dat $(DESTDIR)$(datadir)/units.dat
install-strip: units@EXEEXT@ units.dat install-doc
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)
$(INSTALL_PROGRAM) -s units $(DESTDIR)$(bindir)/`echo units|sed '$(transform)'`
$(INSTALL_DATA) $(srcdir)/units.dat $(DESTDIR)$(datadir)/units.dat
install-doc: install-man install-info
install-man: units.1
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) units.1 $(DESTDIR)$(mandir)/man1/`echo units|sed '$(transform)'`.1
units.man: units.texinfo texi2man
./texi2man units.texinfo > units.man
units.1: units.man
sed s!@DATAFILE@!@UDAT@units.dat! $(srcdir)/units.man > units.1
install-info: $(DESTDIR)$(infodir)/units.info
$(DESTDIR)$(infodir)/units.info: units.info
$(POST_INSTALL)
$(srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
# There may be a newer info file in . than in srcdir.
-if test -f units.info; then d=.; \
else d=$(srcdir); fi; \
$(INSTALL_DATA) $$d/units.info $@; \
# Run install-info only if it exists.
# Use `if' instead of just prepending `-' to the
# line so we notice real errors from install-info.
# We use `$(SHELL) -c' because some shells do not
# fail gracefully when there is an unknown command.
if test -f $(DESTDIR)$(infodir)/dir; then \
if $(SHELL) -c 'install-info --version' \
>/dev/null 2>&1; then \
install-info --dir-file=$(DESTDIR)$(infodir)/dir \
$(DESTDIR)$(infodir)/units.info; \
else true; fi \
else true; fi
Makefile: Makefile.in config.status
./config.status
uninstall:
-rm -f $(DESTDIR)$(bindir)/`echo units|sed '$(transform)'` \
$(DESTDIR)$(mandir)/man1/`echo units|sed '$(transform)'`.1 \
$(DESTDIR)$(infodir)/units.info $(DESTDIR)$(datadir)/units.dat
@if test -f $(DESTDIR)$(infodir)/dir; then \
echo You may need to remove units.info from $(DESTDIR)$(infodir)/dir; \
else true; fi
clean mostlyclean:
-rm -f *.@OBJEXT@ units@EXEEXT@ units.fn units.ky units.pg units.tp \
units.vr units.log units.dvi units.1 units.cp distname .chk \
units.toc units.aux units.cps units.op
distclean: clean
-rm -f config.* Makefile TAGS
maintainer-clean: clean
-rm -f units.doc units.info units.dvi units-*.tar.gz parse.tab.c
sig:
echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \
$(srcdir)/units.c`.tar.gz > distname
echo 'version: 1.1' > `cat distname`.directive
echo 'directory: units' >> `cat distname`.directive
echo 'filename: '`cat distname` >> `cat distname`.directive
gpg --clearsign `cat distname`.directive
gpg -b `cat distname`
-rm -f `cat distname`.directive distname
dist: $(DISTFILES)
echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \
$(srcdir)/units.c` > distname
-rm -r `cat distname` `cat distname`.tar `cat distname`.tar.gz
mkdir `cat distname`
dst=`cat distname`; for f in $(DISTFILES); do \
ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; \
cp -p $(srcdir)/$$f $$dst/$$f ; } \
done
chmod 777 `cat distname`
tar cf `cat distname`.tar `cat distname`
gzip `cat distname`.tar
-rm -rf `cat distname` distname
dvi: units.dvi
units.dvi: units.texinfo
$(TEXI2DVI) $(srcdir)/units.texinfo
info: units.info
units.info: units.texinfo
$(MAKEINFO) $(srcdir)/units.texinfo
units.doc: units.1
nroff -man $(srcdir)/units.1 | col -b > units.doc
doc: units.dvi units.info units.doc
check: all
@echo Checking units
@./units -f $(srcdir)/units.dat \
'(((square(kiloinch)+2.84m2) /0.5) meters^2)^(1|4)' m \
| sed -n -e 's/ \* //p' > .chk
@if [ "`cat .chk`" = 6 ]; then echo Units seems to work; \
else echo Something is wrong: units failed the check: ;cat .chk; fi
@rm -f .chk
configure: configure.ac
autoconf
TAGS: units.c
etags $(srcdir)/units.c $(srcdir)/parse.y
smalldist: units.c units.h parse.y parse.tab.c
echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \
$(srcdir)/units.c` > distname
-rm -r `cat distname` `cat distname`.tar `cat distname`.tar.gz
tar cf `cat distname`.tar units.c units.h parse.y parse.tab.c\
getopt1.c getopt.c getopt.h
gzip `cat distname`.tar
#
# Not very portable code to compile into library (written for Linux)
#
libunits.a: $(OBJECTS)
ar -r libunits.a $^
libunits.so: $(OBJECTS)
$(CC) $(LDFLAGS) -shared -o $@ $^
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: