From 90f86cb5d1692306d36c9363691f5d064bc3fce8 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 4 Dec 2001 09:53:18 +0000 Subject: Makefile.in (AR, RANLIB): Add, for substitutions. * Makefile.in (AR, RANLIB): Add, for substitutions. (all-unilib, $(LIBG2C)): Depend on object lists, not convenience libraries. (s-libe77): Renamed from libE77.la; build object list. (install): Do not move libraries to libdir. (mostlyclean, clean): Adjust. * libF77/Makefile.in (RANLIB): Add. (LINK): Remove. (../s-libf77): Renamed from ../libF77.la; build object list. (../libfrtbegin.a): Remove target first. Don't use $<. (all, clean, distclean): Adjust. * libF77/configure.in: Substitute RANLIB. * libF77/configure: Rebuilt. * libI77/Makefile.in (LINK): Delete. (../s-libi77): Renamed from ../libI77.la; build object list. (all, clean, distclean): Adjust. * libU77/Makefile.in: Likewise. From-SVN: r47605 --- libf2c/Makefile.in | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'libf2c/Makefile.in') diff --git a/libf2c/Makefile.in b/libf2c/Makefile.in index eb0074a..d45c71c 100644 --- a/libf2c/Makefile.in +++ b/libf2c/Makefile.in @@ -1,5 +1,5 @@ # Makefile for GNU F77 compiler runtime. -# Copyright (C) 1995-1998 Free Software Foundation, Inc. +# Copyright (C) 1995-1998, 2001 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Fortran. @@ -61,6 +61,8 @@ INSTALL_DATA = @INSTALL_DATA@ LIBTOOL = @LIBTOOL@ CC = @CC@ CFLAGS = @CFLAGS@ +AR = @AR@ +RANLIB = @RANLIB@ # List of variables to pass to sub-makes. # Quote this way so that it can be used to set shell variables too. @@ -118,24 +120,34 @@ all: all-unilib # meant to be invoked via multi-do for multilibs. # Its dependencies can be satisfied in parallel. The [fiu]77 targets -# always invoke sub makes to check dependencies in the subdirs, else we'd +# update stamp files (object file lists, actually, see the subdir +# makefiles) on which the $(LIBG2C) depends. The stamp files +# s-lib[fiu]77 are intentionally not targets, since we're only meant +# to come in at the level of this target. The [fiu]77 targets always +# invoke sub makes to check dependencies in the subdirs, else we'd # have to maintain them at this level; we live with the overhead of # some recursive makes which may do nothing. -all-unilib: i77 f77 u77 libE77.la +all-unilib: i77 f77 u77 s-libe77 $(MAKE) $(FLAGS_TO_PASS) $(LIBG2C) i77 f77 u77: g2c.h # This target should normally only get invoked via `all-unilib' -- # after all's well in the subdirs -- actually to assemble the library. +# The stamp files contain the object lists of each component of the +# library. The point of breaking them up is to avoid command-line +# length limitations. -$(LIBG2C): libF77.la libI77.la libU77.la libE77.la - rm -f $@ ;\ - set -e; \ +$(LIBG2C): s-libi77 s-libf77 s-libu77 s-libe77 $(LIBTOOL) --mode=link $(CC) -o $@ \ -version-info $(VERSION_MAJOR):$(VERSION_MINOR):$(VERSION_SUB) \ - -rpath $(prefix)/lib libE77.la libF77.la libI77.la libU77.la -lc -lm + -rpath $(prefix)/lib \ + -objectlist s-libe77 \ + -objectlist s-libf77 \ + -objectlist s-libi77 \ + -objectlist s-libu77 \ + -lc -lm i77: cd libI77; $(MAKE) $(FLAGS_TO_PASS) all @@ -146,18 +158,19 @@ f77: u77: cd libU77; $(MAKE) $(FLAGS_TO_PASS) all -libE77.la: f2cext.c - rm -f $@ +s-libe77: f2cext.c if [ -d libE77 ]; then rm -f libE77/*.o libE77/*.lo; else mkdir libE77; fi + -rm -f $@.T $@ for name in $(F2CEXT); \ do \ echo $${name}; \ $(LIBTOOL) --mode=compile $(CC) -c -I. -I$(srcdir) -I../../include \ $(CPPFLAGS) $(CFLAGS) -DL$${name} $(srcdir)/f2cext.c \ - -o libE77/L$${name}.o ; \ + -o libE77/L$${name}.lo ; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + echo libE77/L$${name}.lo >> $@.T; \ done - $(LIBTOOL) --mode=link $(CC) -o libE77.la libE77/*.lo + mv $@.T $@ f2cext.c: g2c.h @@ -192,7 +205,6 @@ check: install: all $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR) - (cd $(libsubdir)/$(MULTISUBDIR) ; mv -f $(LIBG2C_BASE).* $(prefix)/lib) $(INSTALL_DATA) libfrtbegin.a $(libsubdir)/$(MULTISUBDIR) $(RANLIB) $(libsubdir)/$(MULTISUBDIR)/libfrtbegin.a $(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h @@ -220,7 +232,7 @@ mostlyclean: rm -f $(LIBG2C) objlist $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \ $(MULTICLEAN) multi-clean DO=$@ - rm -fr libE77 libE77.la + rm -fr libE77 s-libe77 clean: mostlyclean rm -f config.log @@ -229,7 +241,7 @@ clean: mostlyclean rm -rf .libs distclean: clean - rm -f g2c.h libE77.la + rm -f g2c.h s-libe77 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \ $(MULTICLEAN) multi-clean DO=distclean rm -f config.cache config.status Makefile -- cgit v1.1