aboutsummaryrefslogtreecommitdiff
path: root/libiberty/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/Makefile.in')
-rw-r--r--libiberty/Makefile.in26
1 files changed, 18 insertions, 8 deletions
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index cdf14a4311b..cafb3f7916d 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000, 2001, 2002
+# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -26,6 +26,7 @@
# Makefile for libiberty directory
#
+libiberty_topdir = @libiberty_topdir@
srcdir = @srcdir@
VPATH = @srcdir@
@@ -50,7 +51,7 @@ MULTICLEAN = true
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
+mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
# Some compilers can't handle cc -c blah.c -o foo/blah.o.
OUTPUT_OPTION = @OUTPUT_OPTION@
@@ -84,6 +85,7 @@ FLAGS_TO_PASS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
+ "DESTDIR=$(DESTDIR)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"EXTRA_OFILES=$(EXTRA_OFILES)" \
"HDEFINES=$(HDEFINES)" \
@@ -139,7 +141,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
memset.c mkstemps.c \
objalloc.c obstack.c \
- partition.c pexecute.c putenv.c \
+ partition.c pexecute.c physmem.c putenv.c \
random.c regex.c rename.c rindex.c \
safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
@@ -163,7 +165,7 @@ REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
make-relative-prefix.o \
make-temp-file.o \
objalloc.o obstack.o \
- partition.o pexecute.o \
+ partition.o physmem.o pexecute.o \
safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
strsignal.o \
ternary.o \
@@ -261,6 +263,7 @@ INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST) install-subdir
install_to_libdir: all
+ ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
@@ -276,10 +279,16 @@ install_to_libdir: all
fi
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+# This is tricky. Even though CC in the Makefile contains
+# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+# default multilib, so we have to take LIBCFLAGS into account as well,
+# since it will be passed the multilib flags.
+MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
install_to_tooldir: all
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# needed-list is used by libstdc++. NEEDED is the list of functions
@@ -390,7 +399,7 @@ maintainer-clean-subdir: config.h
@subdirs='$(SUBDIRS)'; \
target=`echo $@ | sed -e 's/-subdir//'`; \
for dir in $$subdirs ; do \
- cd $$dir && $(MAKE) $$target; \
+ cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $$target; \
done
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
@@ -449,6 +458,7 @@ partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h
pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
+physmem.o: config.h $(INCDIR)/libiberty.h
putenv.o: config.h $(INCDIR)/ansidecl.h
random.o: $(INCDIR)/ansidecl.h
regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h