https://github.com/libsdl-org/autoconf/commit/4df6fa1a9b754de40786b1f29d962dc6e0177cc9
From 4df6fa1a9b754de40786b1f29d962dc6e0177cc9 Mon Sep 17 00:00:00 2001
From: oliva <[EMAIL REDACTED]>
Date: Thu, 7 Oct 1999 12:41:33 +0000
Subject: [PATCH] * Makefile.in (dist): Fixed for srcdir != objdir.
---
ChangeLog | 4 ++++
Makefile.in | 16 ++++++++++++----
doc/Makefile.in | 16 ++++++++++++----
3 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c1bf93dd..ef1fc96a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1999-10-07 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * Makefile.in (dist): Fixed for srcdir != objdir.
+
1999-10-07 Akim Demaille <akim@epita.fr>
* acspecific.m4 (AC_CHECK_HEADER_DIRENT): Reintroduce its
diff --git a/Makefile.in b/Makefile.in
index 15bb0dc7..edec20b3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for Autoconf.
-# Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -229,14 +229,22 @@ TAGS:
# Don't depend on DISTFILES because there's no rule for "standards.info*".
dist: $(DISTDEP)
distname=`sed -e '/define(AC_ACVERSION,/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' -e q acgeneral.m4`; \
+ -e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' \
+ -e q ${srcdir}/acgeneral.m4`; \
rm -fr $$distname; \
mkdir $$distname $$distname/testsuite $$distname/testsuite/config \
$$distname/testsuite/lib $$distname/testsuite/autoconf.g \
$$distname/testsuite/autoconf.s; \
for file in $(DISTFILES); do \
- ln $$file $$distname/$$file \
- || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
+ if test -f $$file; then \
+ ln $$file $$distname/$$file \
+ || { echo copying $$file instead; \
+ cp -p $$file $$distname/$$file; } ; \
+ else for file in `CDPATH=:; cd $(srcdir) && echo $$file`; do \
+ ln $(srcdir)/$$file $$distname/$$file \
+ || { echo copying $$file instead; \
+ cp -p $(srcdir)/$$file $$distname/$$file; } ; \
+ done; fi; \
done; \
chmod -R a+rX $$distname; \
tar -chz -f $$distname.tar.gz $$distname; \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 15bb0dc7..edec20b3 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for Autoconf.
-# Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -229,14 +229,22 @@ TAGS:
# Don't depend on DISTFILES because there's no rule for "standards.info*".
dist: $(DISTDEP)
distname=`sed -e '/define(AC_ACVERSION,/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' -e q acgeneral.m4`; \
+ -e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' \
+ -e q ${srcdir}/acgeneral.m4`; \
rm -fr $$distname; \
mkdir $$distname $$distname/testsuite $$distname/testsuite/config \
$$distname/testsuite/lib $$distname/testsuite/autoconf.g \
$$distname/testsuite/autoconf.s; \
for file in $(DISTFILES); do \
- ln $$file $$distname/$$file \
- || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
+ if test -f $$file; then \
+ ln $$file $$distname/$$file \
+ || { echo copying $$file instead; \
+ cp -p $$file $$distname/$$file; } ; \
+ else for file in `CDPATH=:; cd $(srcdir) && echo $$file`; do \
+ ln $(srcdir)/$$file $$distname/$$file \
+ || { echo copying $$file instead; \
+ cp -p $(srcdir)/$$file $$distname/$$file; } ; \
+ done; fi; \
done; \
chmod -R a+rX $$distname; \
tar -chz -f $$distname.tar.gz $$distname; \