summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-09-14 16:48:13 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-09-14 16:48:13 +0000
commit8ce033673d33e920011b569e6480ed55c1198664 (patch)
tree67e9d39851199d709418d9c6c0fdae6306020fd2 /gnu/usr.bin
parent3b4d789d9cb23fa717d5de4b79c043b463b303cd (diff)
Some installation problems: older gnu programs don't know about DESTDIR,
but we have a mix here -> convert the old ones to heed DESTDIR. Also, fix manpages installation in Makefile.bsd-wrapper (INSTALL_MAN setting that got lost, bad MANDIR, don't set MANDIR if PREFIX is the standard location)
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils/Makefile.bsd-wrapper13
-rw-r--r--gnu/usr.bin/binutils/bfd/Makefile.in8
-rw-r--r--gnu/usr.bin/binutils/binutils/Makefile.in10
-rw-r--r--gnu/usr.bin/binutils/gas/Makefile.in12
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.in8
-rw-r--r--gnu/usr.bin/binutils/gdb/doc/Makefile.in2
-rw-r--r--gnu/usr.bin/binutils/ld/Makefile.in14
-rw-r--r--gnu/usr.bin/binutils/mmalloc/Makefile.in10
-rw-r--r--gnu/usr.bin/binutils/readline/Makefile.in20
-rw-r--r--gnu/usr.bin/binutils/readline/doc/Makefile.in6
10 files changed, 58 insertions, 45 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.bsd-wrapper b/gnu/usr.bin/binutils/Makefile.bsd-wrapper
index f24f97643bd..c791fc8b5f1 100644
--- a/gnu/usr.bin/binutils/Makefile.bsd-wrapper
+++ b/gnu/usr.bin/binutils/Makefile.bsd-wrapper
@@ -1,14 +1,20 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.37 2000/09/14 13:15:39 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.38 2000/09/14 16:48:09 espie Exp $
NEW_BINUTILS=alpha mips powerpc hppa
-PREFIX=/usr
SUBDIRS= opcodes bfd
ALL_X11_MODULES=
INSTALL_X11_MODULES=
-MANDIR=${PREFIX}/man/cat
+
+# This allows moving the whole binutils installation around for
+# testing purposes
+PREFIX=/usr
+.if ${PREFIX} != "/usr"
+MANDIR=${PREFIX}/share/man/cat
+.endif
+
MAN=
.if ${MACHINE_ARCH} != "unknown"
@@ -68,6 +74,7 @@ config.status: do-config
install: maninstall
SUBDIRS='${SUBDIRS}' ${MAKE} DESTDIR='${DESTDIR}' INSTALL_MAN= \
INSTALL_X11_MODULES="${INSTALL_X11_MODULES}" \
+ INSTALL_MAN= \
INSTALL_MODULES='${INSTALL_MODULES}' install install-info
cd ${.OBJDIR}/binutils && \
${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} \
diff --git a/gnu/usr.bin/binutils/bfd/Makefile.in b/gnu/usr.bin/binutils/bfd/Makefile.in
index 83d5caa58d0..348a279279f 100644
--- a/gnu/usr.bin/binutils/bfd/Makefile.in
+++ b/gnu/usr.bin/binutils/bfd/Makefile.in
@@ -1079,10 +1079,10 @@ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
# Install BFD include file, and others that it needs.
install-data-local: $(BFD_H)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(includedir)
- $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h
- $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
- $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
+ $(mkinstalldirs) $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h
+ $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h
+ $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
diff --git a/gnu/usr.bin/binutils/binutils/Makefile.in b/gnu/usr.bin/binutils/binutils/Makefile.in
index 2ff5efad2a1..64482fea7a4 100644
--- a/gnu/usr.bin/binutils/binutils/Makefile.in
+++ b/gnu/usr.bin/binutils/binutils/Makefile.in
@@ -1202,18 +1202,18 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
- $(mkinstalldirs) $(tooldir)/bin
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
for i in $(TOOL_PROGS); do \
if [ -f $$i$(EXEEXT) ]; then \
j=`echo $$i | sed -e 's/-new//'`; \
k=`echo $$j | sed '$(transform)'`; \
if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
- rm -f $(tooldir)/bin/$$j$(EXEEXT); \
- ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
+ rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
+ ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
fi; \
else true; \
fi; \
diff --git a/gnu/usr.bin/binutils/gas/Makefile.in b/gnu/usr.bin/binutils/gas/Makefile.in
index 0a423dcc979..0ac1b78c11c 100644
--- a/gnu/usr.bin/binutils/gas/Makefile.in
+++ b/gnu/usr.bin/binutils/gas/Makefile.in
@@ -2353,21 +2353,21 @@ cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
install-exec-local: install-exec-bindir @install_tooldir@
install-exec-bindir: $(noinst_PROGRAMS)
- $(mkinstalldirs) $(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
- $(mkinstalldirs) $(tooldir)/bin
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
n=`echo as | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
- rm -f $(tooldir)/bin/as$(EXEEXT); \
- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+ rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
+ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
else \
true ; \
fi
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.in b/gnu/usr.bin/binutils/gdb/Makefile.in
index 47e5b0b4bc5..e59638ec64a 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.in
+++ b/gnu/usr.bin/binutils/gdb/Makefile.in
@@ -41,6 +41,8 @@ man9dir = $(mandir)/man9
infodir = @infodir@
includedir = @includedir@
+DESTDIR =
+
SHELL = /bin/sh
INSTALL = @INSTALL@
@@ -544,16 +546,16 @@ install-only: $(INSTALL_MAN)
else \
true ; \
fi ; \
- $(INSTALL_PROGRAM) gdb $(bindir)/$$transformed_name ; \
+ $(INSTALL_PROGRAM) gdb $(DESTDIR)$(bindir)/$$transformed_name ; \
if [ x"$(ENABLE_GDBTK)" != x ] ; then \
- $(INSTALL_DATA) $(srcdir)/gdbtk.tcl $(datadir)/gdbtk.tcl ; \
+ $(INSTALL_DATA) $(srcdir)/gdbtk.tcl $(DESTDIR)$(datadir)/gdbtk.tcl ; \
else \
true ; \
fi
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
install-man:
- $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
+ $(INSTALL_DATA) $(srcdir)/gdb.1 $(DESTDIR)$(man1dir)/$$transformed_name.1
uninstall: force
transformed_name=`t='$(program_transform_name)'; \
diff --git a/gnu/usr.bin/binutils/gdb/doc/Makefile.in b/gnu/usr.bin/binutils/gdb/doc/Makefile.in
index 96350b060b2..a4af00186ab 100644
--- a/gnu/usr.bin/binutils/gdb/doc/Makefile.in
+++ b/gnu/usr.bin/binutils/gdb/doc/Makefile.in
@@ -98,7 +98,7 @@ all-doc: info dvi ps
install-info: info
for i in *.info* ; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
done
STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi
diff --git a/gnu/usr.bin/binutils/ld/Makefile.in b/gnu/usr.bin/binutils/ld/Makefile.in
index cd3ea6caa64..5aefd621027 100644
--- a/gnu/usr.bin/binutils/ld/Makefile.in
+++ b/gnu/usr.bin/binutils/ld/Makefile.in
@@ -1498,24 +1498,24 @@ mostlyclean-local:
.PHONY: install-exec-local install-data-local
install-exec-local: ld-new$(EXEEXT)
- $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
n=`echo ld | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
- rm -f $(tooldir)/bin/ld$(EXEEXT); \
- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
+ rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
+ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
fi
install-data-local:
- $(mkinstalldirs) $(scriptdir)/ldscripts
+ $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
for f in ldscripts/*; do \
- $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
done
diststuff: $(LDDISTSTUFF) info
distclean-local:
diff --git a/gnu/usr.bin/binutils/mmalloc/Makefile.in b/gnu/usr.bin/binutils/mmalloc/Makefile.in
index 2df74d16bd6..f039277bdbb 100644
--- a/gnu/usr.bin/binutils/mmalloc/Makefile.in
+++ b/gnu/usr.bin/binutils/mmalloc/Makefile.in
@@ -46,6 +46,8 @@ man9dir = $(mandir)/man9
infodir = @infodir@
includedir = @includedir@
+DESTDIR =
+
SHELL = /bin/sh
INSTALL = @INSTALL@
@@ -106,7 +108,7 @@ mmalloc.dvi: mmalloc.texi
install-info: info
if test ! -f mmalloc.info ; then cd $(srcdir); fi; \
- $(INSTALL_DATA) mmalloc.info $(infodir)/mmalloc.info
+ $(INSTALL_DATA) mmalloc.info $(DESTDIR)$(infodir)/mmalloc.info
check: test1.c
# $(CC) -g $(srcdir)/test1.c libmmalloc.a
@@ -116,9 +118,9 @@ check: test1.c
# ./a.out
install: all
- $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
- $(RANLIB) $(libdir)/$(TARGETLIB).n
- mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(TARGETLIB).n
+ $(RANLIB) $(DESTDIR)$(libdir)/$(TARGETLIB).n
+ mv -f $(DESTDIR)$(libdir)/$(TARGETLIB).n $(DESTDIR)$(libdir)/$(TARGETLIB)
$(TARGETLIB): $(OFILES)
$(RM) -rf $@
diff --git a/gnu/usr.bin/binutils/readline/Makefile.in b/gnu/usr.bin/binutils/readline/Makefile.in
index 0362de2ab1e..ddc00106ffb 100644
--- a/gnu/usr.bin/binutils/readline/Makefile.in
+++ b/gnu/usr.bin/binutils/readline/Makefile.in
@@ -43,6 +43,8 @@ man9dir = $(mandir)/man9
infodir = $(prefix)/share/info
includedir = $(prefix)/include
+DESTDIR =
+
SHELL = /bin/sh
INSTALL = install -c
@@ -181,17 +183,17 @@ readline.tar.Z: readline.tar
compress -f readline.tar
install:
- $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
- $(RANLIB) $(libdir)/libreadline.a
- $(INSTALL_DATA) $(srcdir)/readline.h $(includedir)/readline/readline.h
- $(INSTALL_DATA) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
- $(INSTALL_DATA) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
+ $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
+ $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
+ $(INSTALL_DATA) $(srcdir)/readline.h $(DESTDIR)$(includedir)/readline/readline.h
+ $(INSTALL_DATA) $(srcdir)/keymaps.h $(DESTDIR)$(includedir)/readline/keymaps.h
+ $(INSTALL_DATA) $(srcdir)/chardefs.h $(DESTDIR)$(includedir)/readline/chardefs.h
includes:
- $(INSTALL_FILE) $(srcdir)/readline.h $(includedir)/readline/readline.h
- $(INSTALL_FILE) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
- $(INSTALL_FILE) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
- $(INSTALL_FILE) $(srcdir)/history.h $(includedir)/readline/history.h
+ $(INSTALL_FILE) $(srcdir)/readline.h $(DESTDIR)$(includedir)/readline/readline.h
+ $(INSTALL_FILE) $(srcdir)/keymaps.h $(DESTDIR)$(includedir)/readline/keymaps.h
+ $(INSTALL_FILE) $(srcdir)/chardefs.h $(DESTDIR)$(includedir)/readline/chardefs.h
+ $(INSTALL_FILE) $(srcdir)/history.h $(DESTDIR)$(includedir)/readline/history.h
local-clean:
rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
diff --git a/gnu/usr.bin/binutils/readline/doc/Makefile.in b/gnu/usr.bin/binutils/readline/doc/Makefile.in
index 1202fcff0ee..95da19c34d1 100644
--- a/gnu/usr.bin/binutils/readline/doc/Makefile.in
+++ b/gnu/usr.bin/binutils/readline/doc/Makefile.in
@@ -51,11 +51,11 @@ info: history.info readline.info
dvi: history.dvi readline.dvi
install-info: info
- -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
+ -parent=`echo $(DESTDIR)$(infodir)|sed -e 's@/[^/]*$$@@'`; \
if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
- -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
+ -if [ -d $(DESTDIR)$(infodir) ] ; then true ; else mkdir $(DESTDIR)$(infodir) ; fi
for i in *.info* ; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
done
history.info: hist.texinfo hsuser.texinfo hstech.texinfo