Jim Meyering <[EMAIL PROTECTED]> writes:
> Do you know anyone who prefers that their generated files be writable?
Well, me for starters (:-). It's a minor style thing, but I prefer
that files be marked readonly only when they are intended to be
unchangeable. Removing a readonly file and replacing it with a new
readonly file counts as a change here, since it causes "make" to
regenerate things.
> how about prefixing each new line with "@"
Sometimes that's the best of a bad set of choices, but generally it's
better to omit the '@' so that 'make' output can be cut and pasted
(and understood by humans). Here the @ doesn't save all that much, so
let's omit it.
> For the 9 rules that use "cp", I'd prefer your two-liner, but for the
> fact that the generated files would not necessarily be read-only.
Why wouldn't the generated files be readonly for coreutils?
The source is readonly, so cp will create a readonly destination.
Here's another thought: how about this even-shorter version instead?
alloca.h: alloca_.h
$(LN_F_S) $(srcdir)/alloca_.h $@
where $(LN_FS) expands to "ln -fs" in the typical case, or to
"rm -f $@ && cp" on hosts where "ln -fs" doesn't work (e.g., Solaris 9
and earlier).