Changes to make an installed cross-compiler find everything correctly.
authorIan Lance Taylor <ian@airs.com>
Tue, 15 Sep 1992 23:27:10 +0000 (23:27 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 15 Sep 1992 23:27:10 +0000 (23:27 +0000)
Tue Sep 15 15:32:02 1992  Ian Lance Taylor  (ian@cygnus.com)

* Makefile.in (install): if $(tooldir) exists, install as in
$(tooldir)/bin.

gas/ChangeLog
gas/Makefile.in

index 31a41f59bfd3c8682edb688d032450b7f0a447a3..6394d8db0d7bcd0c4de2f99ffad8dcd6db61601d 100644 (file)
@@ -1,3 +1,8 @@
+Tue Sep 15 15:32:02 1992  Ian Lance Taylor  (ian@cygnus.com)
+
+       * Makefile.in (install): if $(tooldir) exists, install as in
+       $(tooldir)/bin.
+
 Sun Sep 13 20:30:10 1992  Ian Lance Taylor  (ian@cygnus.com)
 
        * Added WARN_SIGNED_OVERFLOW_WORD define to give an error if any
index affef2ea8c478857d50573cc58a5aa0c9391c313..04042b3211e39f101f5e0ae0df751a83a2270e6d 100644 (file)
@@ -32,7 +32,7 @@ program_transform_name =
 exec_prefix = $(prefix)
 bindir = $(exec_prefix)/bin
 libdir = $(exec_prefix)/lib
-tooldir = $(libdir)
+tooldir = $(libdir)/$(target_alias)
 
 datadir = $(prefix)/lib
 mandir = $(prefix)/man
@@ -358,9 +358,13 @@ install:
        -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
        rm -f $(bindir)/$$n; \
        $(INSTALL_PROGRAM) as.new $(bindir)/$$n; \
-       rm -f $(tooldir)/as; \
-       ln $(bindir)/$$n $(tooldir)/as || cp $(bindir)/$$n $(tooldir)/as; \
-       $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1
+       $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1; \
+       if [ -d $(tooldir) ]; then \
+         if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
+         rm -f $(tooldir)/bin/as; \
+         ln $(bindir)/$$n $(tooldir)/bin/as \
+          || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
+       else true; fi
 
 # Cancel installation by deleting the installed files.
 uninstall: