merge from gcc
[deliverable/binutils-gdb.git] / libiberty / Makefile.in
index 3dccfada3d7aaa8bbcada0410b5507ee852e84e3..064179669bd84dc6bdaa2c9306d900197c3a7dc9 100644 (file)
@@ -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,10 @@ 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@
 
 AR = @AR@
 AR_FLAGS = rc
@@ -81,6 +85,7 @@ FLAGS_TO_PASS = \
        "AR_FLAGS=$(AR_FLAGS)" \
        "CC=$(CC)" \
        "CFLAGS=$(CFLAGS)" \
+       "DESTDIR=$(DESTDIR)" \
        "LIBCFLAGS=$(LIBCFLAGS)" \
        "EXTRA_OFILES=$(EXTRA_OFILES)" \
        "HDEFINES=$(HDEFINES)" \
@@ -102,7 +107,7 @@ SUBDIRS = testsuite
 
 # FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
 all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
-       @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
+       @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
 
 .PHONY: check installcheck
 check: check-subdir
@@ -117,7 +122,7 @@ COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiber
        if [ x"$(PICFLAG)" != x ]; then \
          $(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
        else true; fi
-       $(COMPILE.c) $<
+       $(COMPILE.c) $< $(OUTPUT_OPTION)
 
 # NOTE: If you add new files to the library, add them to this list
 # (alphabetical), and add them to REQUIRED_OFILES, or
@@ -132,10 +137,15 @@ CFILES = alloca.c argv.c asprintf.c atexit.c                              \
        hashtab.c hex.c                                                 \
        index.c insque.c                                                \
        lbasename.c                                                     \
+       lrealpath.c                                                     \
+       make-relative-prefix.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                                                     \
+        pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c                    \
+        pex-unix.c pex-win32.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         \
@@ -156,9 +166,11 @@ REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o          \
        getopt.o getopt1.o getpwd.o getruntime.o                        \
        hashtab.o hex.o                                                 \
        lbasename.o                                                     \
+       lrealpath.o                                                     \
+       make-relative-prefix.o                                          \
        make-temp-file.o                                                \
        objalloc.o obstack.o                                            \
-       partition.o pexecute.o                                          \
+       partition.o physmem.o @pexecute@                                                \
        safe-ctype.o sort.o spaces.o splay-tree.o strerror.o            \
         strsignal.o                                                    \
        ternary.o                                                       \
@@ -175,7 +187,9 @@ CONFIGURED_OFILES = asprintf.o atexit.o                                     \
        getcwd.o getpagesize.o                                          \
        index.o insque.o                                                \
        memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o        \
-       putenv.o                                                        \
+       pex-djgpp.o pex-mpw.o pex-msdos.o pex-os2.o                     \
+        pex-unix.o pex-win32.o                                         \
+        putenv.o                                                       \
        random.o rename.o rindex.o                                      \
        setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o            \
         strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o   \
@@ -234,7 +248,7 @@ TEXISRC = \
 # Additional files that have texi snippets that need to be collected
 # and sorted.  Some are here because the sources are imported from
 # elsewhere.  Others represent headers in ../include.
-TEXIFILES = fnmatch.txh
+TEXIFILES = fnmatch.txh pexecute.txh
 
 libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
        $(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
@@ -256,25 +270,27 @@ INSTALL_DEST = @INSTALL_DEST@
 install: install_to_$(INSTALL_DEST) install-subdir
 
 install_to_libdir: all
-       $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
-       ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
-       mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+       ${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)
        if test -n "${target_header_dir}"; then \
          case "${target_header_dir}" in \
            /*)    thd=${target_header_dir};; \
            *)     thd=${includedir}${MULTISUBDIR}/${target_header_dir};; \
          esac; \
-         ${mkinstalldirs} $${thd}; \
+         ${mkinstalldirs} $(DESTDIR)$${thd}; \
          for h in ${INSTALLED_HEADERS}; do \
-           ${INSTALL_DATA} $$h $${thd}; \
+           ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
          done; \
        fi
        @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install_to_tooldir: all
-       $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
-       ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
-       mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+       ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`
+       $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
+       ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n )
+       mv -f $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)
        @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 # needed-list is used by libstdc++.  NEEDED is the list of functions
@@ -385,7 +401,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
@@ -429,6 +445,8 @@ hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
 hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
 lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
        $(INCDIR)/safe-ctype.h
+lrealpath.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+make-relative-prefix.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
 make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
 md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
 memchr.o: $(INCDIR)/ansidecl.h
@@ -441,8 +459,14 @@ objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
 obstack.o: config.h $(INCDIR)/obstack.h
 partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
        $(INCDIR)/partition.h
-pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+pex-djgpp.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-mpw.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-msdos.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
        $(INCDIR)/safe-ctype.h
+pex-os2.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-unix.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-win32.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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
This page took 0.026978 seconds and 4 git commands to generate.