automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SunOS4 compatibility


From: Ralf Wildenhues
Subject: Re: SunOS4 compatibility
Date: Mon, 23 Mar 2009 21:51:55 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Bob,

* Bob Friesenhahn wrote on Sun, Mar 22, 2009 at 04:55:44PM CET:
> On Sun, 22 Mar 2009, Ralf Wildenhues wrote:
>>
>> Oh brother.  According to autoconf.info, SunOS4 'cp' did not support the
>> -f option.  Anyone think we still need 'make dist' to work there?
>
> I don't think that support for 'make dist' on a bare system is  
> necessary.  This is not even close to a modern system that a developer  
> will use.

> It is likely that systems still exist.

Well, if there is need, then I guess this patch can help.  Question is
whether other, newer systems might have dysfunctional `cp -f' too; then
we could use it.

Cheers,
Ralf

    Fix distdir rule for systems without `cp -f'.
    
    * lib/am/distdir.am (distdir): Try `cp -pR' if `cp -fpR' fails,
    for systems like SunOS 4 whose `cp' does not understand `-f'.

diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 5ee7b5c..875b923 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  Free
-## Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+## 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
@@ -208,10 +208,14 @@ endif %?TOPDIR_P%
              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" \
+## SunOS 4 cp does not understand `-f', so try without.
+             || cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+## SunOS 4 cp does not understand `-f', so try without.
+           cp -fpR $$d/$$file "$(distdir)$$dir" \
+           || cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
 ## Test for file existence because sometimes a file gets included in
 ## DISTFILES twice.  For example this happens when a single source




reply via email to

[Prev in Thread] Current Thread [Next in Thread]