[Top][All Lists]

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

Re: ensure that generated files are read-only

From: Paul Eggert
Subject: Re: ensure that generated files are read-only
Date: Wed, 06 Sep 2006 22:11:14 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> alloca.h: alloca_.h
>       rm -f address@hidden $@
>       cp $(srcdir)/alloca_.h address@hidden
>       chmod a-x address@hidden
>       mv address@hidden $@

One other thing -- how about if we just remove the 'chmod' entirely?
If the source is readonly, that'd make the destination readonly.
Plus it wouldn't bother people who prefer to have read-write files,
and it'd save a command and a line of 'make' output.

An even shorter possibility would be:

alloca.h: alloca_.h
        cp -f $(srcdir)/alloca_.h address@hidden
        mv -f address@hidden $@

This relies on 'cp -f' and 'mv -f', but that's universal nowadays, no?
(If not, we could autoconfize it.)

reply via email to

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