]> gcc.gnu.org Git - gcc.git/blame - libf2c/Makefile.in
open.c: Back out part of last Netlib update affecting scratch files which clashed...
[gcc.git] / libf2c / Makefile.in
CommitLineData
81fea2b1 1# Makefile for GNU F77 compiler runtime.
b53c05f5 2# Copyright (C) 1995-1998 Free Software Foundation, Inc.
81fea2b1
JL
3# Contributed by Dave Love (d.love@dl.ac.uk).
4#
5#This file is part of GNU Fortran.
6#
7#GNU Fortran is free software; you can redistribute it and/or modify
8#it under the terms of the GNU General Public License as published by
9#the Free Software Foundation; either version 2, or (at your option)
10#any later version.
11#
12#GNU Fortran is distributed in the hope that it will be useful,
13#but WITHOUT ANY WARRANTY; without even the implied warranty of
14#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15#GNU General Public License for more details.
16#
17#You should have received a copy of the GNU General Public License
18#along with GNU Fortran; see the file COPYING. If not, write to
19#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20#02111-1307, USA.
21
22SHELL = /bin/sh
23
24#### Start of system configuration section. ####
25
26srcdir = @srcdir@
b53c05f5 27VPATH = @srcdir@
81fea2b1
JL
28prefix = @prefix@
29exec_prefix = @exec_prefix@
0f1d4fad 30target_alias = @target_alias@
6174dcf3 31gcc_version = @gcc_version@
f1943b77 32gcc_version_trigger = @gcc_version_trigger@
81fea2b1 33
81fea2b1 34libdir = $(exec_prefix)/lib
6174dcf3 35libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
81fea2b1 36
ab300375
RL
37# Multilib support variables.
38MULTISRCTOP =
39MULTIBUILDTOP =
40MULTIDIRS =
41MULTISUBDIR =
42MULTIDO = true
43MULTICLEAN = true
44
b53c05f5
DL
45# Not configured per top-level version, since that doesn't get passed
46# down at configure time, but overrridden by the top-level install
47# target.
48INSTALL = @INSTALL@
49INSTALL_PROGRAM = @INSTALL_PROGRAM@
50INSTALL_DATA = @INSTALL_DATA@
81fea2b1 51
b53c05f5 52AR = @AR@
81fea2b1
JL
53AR_FLAGS = rc
54
b53c05f5 55RANLIB = @RANLIB@
81fea2b1 56
b53c05f5
DL
57CC = @CC@
58CFLAGS = @CFLAGS@
81fea2b1 59
b53c05f5
DL
60# List of variables to pass to sub-makes.
61# Quote this way so that it can be used to set shell variables too.
62# Currently no use for PICFLAG, RUNTESTFLAGS -- check usage.
81fea2b1 63FLAGS_TO_PASS= \
b53c05f5
DL
64 CC='$(CC)' \
65 CFLAGS='$(CFLAGS)' \
66 CPPFLAGS='$(CPPFLAGS)' \
67 AR='$(AR)' \
563f648b 68 RANLIB='$(RANLIB)' \
b53c05f5
DL
69 PICFLAG='$(PICFLAG)' \
70 RUNTESTFLAGS='$(RUNTESTFLAGS)'
81fea2b1 71
f30bc2e7 72LIBG2C = libg2c.a
81fea2b1 73
b53c05f5 74SUBDIRS = libI77 libF77 libU77
81fea2b1
JL
75
76F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \
77 signal system flush ftell fseek access besj0 besj1 besjn besy0 besy1 \
78 besyn chdir chmod ctime date dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
79 dtime etime fdate fgetc fget flush1 fnum fputc fput fstat gerror \
80 getcwd getgid getlog getpid getuid gmtime hostnm idate ierrno irand \
81 isatty itime kill link lnblnk lstat ltime mclock perror rand rename \
28ef523e 82 secnds second sleep srand stat symlnk time ttynam umask unlink \
81fea2b1
JL
83 vxtidt vxttim alarm
84
affb86c1
DL
85# These dependencies can be satisfied in parallel. The [fiu]77
86# targets update stamp files which the $(LIBG2C) target checks in the
87# sub-make. (Probably only one stamp file is really needed.)
88all: i77 f77 u77 s-libe77
ab300375 89 $(MULTIDO) $(FLAGS_TO_PASS) $(LIBG2C) multi-do DO="all $(LIBG2C)"
81fea2b1 90
b53c05f5
DL
91i77 f77 u77: g2c.h
92
5d01f362 93$(LIBG2C): s-libi77 s-libf77 s-libu77 s-libe77
f30bc2e7 94 rm -f $(LIBG2C)
b53c05f5
DL
95 set -e; \
96 for i in $(SUBDIRS); \
97 do (cd $$i && $(MAKE) $(FLAGS_TO_PASS) LIBG2C=../$(LIBG2C) archive); \
98 done
2929d7a2 99 objs=""; for i in $(F2CEXT); do objs="$$objs libE77/L$$i.o"; done; \
f30bc2e7
CB
100 $(AR) $(AR_FLAGS) $(LIBG2C) $$objs
101 $(RANLIB) $(LIBG2C)
81fea2b1 102
b53c05f5 103i77:
f30bc2e7 104 cd libI77; $(MAKE) $(FLAGS_TO_PASS) all
81fea2b1 105
b53c05f5 106f77:
f30bc2e7 107 cd libF77; $(MAKE) $(FLAGS_TO_PASS) all
81fea2b1 108
b53c05f5 109u77:
f30bc2e7 110 cd libU77; $(MAKE) $(FLAGS_TO_PASS) all
81fea2b1 111
b07d0891 112s-libe77: f2cext.c
f30bc2e7 113 if [ -d libE77 ]; then rm -f libE77/*.o; else mkdir libE77; fi
81fea2b1
JL
114 for name in $(F2CEXT); \
115 do \
116 echo $${name}; \
117 $(CC) -c -I. -I$(srcdir) -I../../include $(CPPFLAGS) $(CFLAGS) \
f30bc2e7 118 -DL$${name} $(srcdir)/f2cext.c \
81fea2b1
JL
119 -o libE77/L$${name}.o; \
120 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
121 done
5d01f362 122 echo timestamp >s-libe77
81fea2b1 123
b07d0891 124${srcdir}/configure: configure.in
b53c05f5
DL
125 rm -f config.cache
126 cd $(srcdir) && autoconf
127
128# Dependence on Makefile serializes for parallel make.
b07d0891 129g2c.h: g2c.hin config.status Makefile
b53c05f5
DL
130# Might try to avoid rebuilding everything if Makefile or configure
131# changes and g2c.h doesn't; see also the Makefile rule. Should
132# depend on another stamp file rather than using the commented-out
133# lines below, since g2c.h isn't necessarily brought up to date.
134# mv g2c.h g2c.x
9992b2e1 135 $(SHELL) config.status
b53c05f5
DL
136# $(srcdir)/../move-if-change g2c.h g2c.x && mv g2c.x g2c.h
137
b07d0891 138Makefile: Makefile.in config.status
b53c05f5
DL
139# Autoconf doc uses `./config.status'. Is there a good reason to use
140 $(SHELL) config.status
141
b07d0891 142config.status: configure $(gcc_version_trigger)
b53c05f5
DL
143# Make sure we don't pick up a site config file and that configure
144# gets run with correct values of variables such as CC.
145 CONFIG_SITE=no-such-file $(FLAGS_TO_PASS) \
146 $(SHELL) config.status --recheck
81fea2b1 147
b53c05f5 148info install-info clean-info dvi TAGS dist installcheck installdirs:
9992b2e1
DL
149
150check:
151 cd libU77; $(MAKE) G77DIR=../../../gcc/ check
12346e71 152
b53c05f5 153install: all
ab300375
RL
154 $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n
155 ( cd $(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n )
156 mv -f $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
f30bc2e7
CB
157 $(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h
158 @if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \
159 echo ''; \
160 echo 'Warning: g77 no longer installs libf2c.a or f2c.h.'; \
161 echo ' You must do so yourself. For more information,'; \
162 echo ' read "Distributing Binaries" in the g77 docs.'; \
163 echo ' (To turn off this warning, delete the file'; \
164 echo ' f2c-install-ok in the source or build directory.)'; \
165 echo ''; \
50a029fd 166 else true; fi
ab300375 167 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
81fea2b1 168
b53c05f5
DL
169install-strip:
170 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
171
172uninstall:
ab300375
RL
173 rm -f $(libsubdir)/$(MULTISUBDIR)/include/g2c.h $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
174 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
b53c05f5 175
81fea2b1 176mostlyclean:
b53c05f5 177 rm -f $(LIBG2C)
ab300375
RL
178 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
179 $(MULTICLEAN) multi-clean DO=$@
180 rm -fr libE77 s-libe77
81fea2b1 181
b53c05f5
DL
182clean: mostlyclean
183 rm -f config.log
ab300375
RL
184 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
185 $(MULTICLEAN) multi-clean DO=$@
f30bc2e7 186
b53c05f5 187distclean: clean
5d01f362 188 rm -f Makefile config.cache config.status g2c.h s-libe77
ab300375
RL
189 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
190 @$(MULTICLEAN) multi-clean DO=distclean
f30bc2e7
CB
191
192maintainer-clean:
81fea2b1 193
b07d0891 194rebuilt: configure
81fea2b1 195
b53c05f5 196.PHONY: rebuilt mostlyclean clean distclean maintainer-clean all \
affb86c1 197 i77 f77 u77 check uninstall install-strip dist \
b53c05f5 198 installcheck installdirs
ab300375
RL
199
200subdir_do:
201 @rootpre=`pwd`/; export rootpre; \
202 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
203 for i in .. $(DODIRS); do \
204 if [ x$$i != x.. ]; then \
205 if [ -f ./$$i/Makefile ]; then \
206 if (cd ./$$i; $(MAKE) $(FLAGS_TO_PASS) $(DO)); then \
207 true; \
208 else \
209 exit 1; \
210 fi; \
211 else true; fi; \
212 else true; fi; \
213 done
214
This page took 0.09118 seconds and 5 git commands to generate.