107 lines
5.1 KiB
Text
107 lines
5.1 KiB
Text
$NetBSD: patch-gcc_f_Make-lang.in,v 1.2 2015/12/29 23:34:47 dholland Exp $
|
|
|
|
DESTDIR support.
|
|
|
|
--- gcc/f/Make-lang.in.orig 1999-06-07 06:44:57.000000000 +0000
|
|
+++ gcc/f/Make-lang.in
|
|
@@ -312,18 +312,18 @@ f77.install-normal:
|
|
# run, since we use libsubdir to store our `flag' file, lang-f77.
|
|
f77.install-common: installdirs
|
|
case "$(LANGUAGES)" in \
|
|
- *[fF]77*) touch $(libsubdir)/lang-f77;; \
|
|
- *) rm -f $(libsubdir)/lang-f77;; \
|
|
+ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
+ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
esac
|
|
- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
|
|
+ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
|
|
if [ -f g77-cross$(exeext) ] ; then \
|
|
- rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
- $(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
- chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
+ rm -f $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
+ $(INSTALL_PROGRAM) g77-cross$(exeext) $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
+ chmod a+x $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
|
|
else \
|
|
- rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
- $(INSTALL_PROGRAM) g77$(exeext) $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
- chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
+ rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
+ $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
+ chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
|
|
fi ; \
|
|
else true; fi
|
|
@if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \
|
|
@@ -335,7 +335,7 @@ f77.install-common: installdirs
|
|
echo ' f77-install-ok in the source or build directory.)'; \
|
|
echo ''; \
|
|
else true; fi
|
|
- rm -f $(libsubdir)/lang-f77
|
|
+ rm -f $(DESTDIR)$(libsubdir)/lang-f77
|
|
|
|
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
|
|
# to do the install. The sed rule was copied from stmp-int-hdrs.
|
|
@@ -343,44 +343,44 @@ f77.install-common: installdirs
|
|
# run, since we use libsubdir to store our `flag' file, lang-f77.
|
|
f77.install-info: f77.info installdirs
|
|
case "$(LANGUAGES)" in \
|
|
- *[fF]77*) touch $(libsubdir)/lang-f77;; \
|
|
- *) rm -f $(libsubdir)/lang-f77;; \
|
|
+ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
+ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
esac
|
|
- if [ -f $(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \
|
|
- rm -f $(infodir)/g77.info*; \
|
|
+ if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \
|
|
+ rm -f $(DESTDIR)$(infodir)/g77.info*; \
|
|
for f in f/g77.info*; do \
|
|
realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
|
|
- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
|
|
+ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
|
|
done; \
|
|
- chmod a-x $(infodir)/g77.info*; \
|
|
+ chmod a-x $(DESTDIR)$(infodir)/g77.info*; \
|
|
else true; fi
|
|
- @if [ -f $(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
|
|
+ @if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
|
|
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
|
echo " install-info --info-dir=$(infodir) $(infodir)/g77.info"; \
|
|
- install-info --info-dir=$(infodir) $(infodir)/g77.info || : ; \
|
|
+ install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
|
|
else : ; fi; \
|
|
else : ; fi
|
|
- rm -f $(libsubdir)/lang-f77
|
|
+ rm -f $(DESTDIR)$(libsubdir)/lang-f77
|
|
|
|
# Make sure `installdirs' target (from gcc Makefile) has been
|
|
# run, since we use libsubdir to store our `flag' file, lang-f77.
|
|
f77.install-man: $(srcdir)/f/g77.1 installdirs
|
|
case "$(LANGUAGES)" in \
|
|
- *[fF]77*) touch $(libsubdir)/lang-f77;; \
|
|
- *) rm -f $(libsubdir)/lang-f77;; \
|
|
+ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
+ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
|
|
esac
|
|
- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
|
|
+ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
|
|
if [ -f g77-cross$(exeext) ] ; then \
|
|
- rm -f $(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
- chmod a-x $(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
+ rm -f $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
+ chmod a-x $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
|
|
else \
|
|
- rm -f $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
- chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
+ rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
+ chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
|
|
fi; \
|
|
else true; fi
|
|
- rm -f $(libsubdir)/lang-f77
|
|
+ rm -f $(DESTDIR)$(libsubdir)/lang-f77
|
|
|
|
# Make sure `installdirs' target (from gcc Makefile) has been
|
|
# run, since we use libsubdir to store our `flag' file, lang-f77.
|