bug-gnulib
[Top][All Lists]
Advanced

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

Re: ensure that generated files are read-only


From: Jim Meyering
Subject: Re: ensure that generated files are read-only
Date: Fri, 15 Sep 2006 15:39:31 +0200

Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> aren't the warning and possible annoyance at least a little more
>> appropriate for the build-generated files whose rules I was proposing
>> to change in gnulib?
>
> I suppose so, yes.
>
> Isn't this a generic problem that has been around for years?

Yes.  And the status quo isn't horrible or anything like that.
Just a little suboptimal, imho.

I've been making generated files read-only for ages, in non-GNU
contexts, and no one has ever complained.  Hence my surprise...

> For example, Bison (which I happen to be looking at right now)
> generates .c files from .y files, and people might edit the .c files.
> The first line of a Bison-generated C file looks like this:
>
>    /* A Bison parser, made by GNU Bison 2.3a.  */
>
> but there's no magic to scare off Emacs or vi users.
>
> If I understand Bruno correctly, he wouldn't object to adding a
> comment to the start of (say) the gnulib-generated stdint.h saying
> that the file was generated automatically from stdint_.h.  That'd be
> similar to the first line of the Bison-generated C parser.
>
> But if I understand you correctly, you want something stronger, which
> affects Emacs and/or vi, for generated files.

Yes.  I think that is a reasonable compromise.

> At least for Emacs, can we address this issue without changing the
> comments of the generated files, by putting an index of "please don't
> edit" files somewhere else?  Such a list could be visible only to
> people who ask for this feature, or something like that.

If it comes to that, it's not worth our trouble, since
the people who need the feature (novices, who are likely to
mistakenly change a generated file) will never know to enable it.




reply via email to

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