+2006-08-05 Theodore Ts'o <tytso@mit.edu>
+
+ * compile_et.sh.in: Create the generated .c and .h files read-only
+ to remind developers they shouldn't edit them.
+
2005-12-10 Theodore Ts'o <tytso@mit.edu>
* Makefile.in: Add a dependency to make sure that the
$AWK -f "${DIR}/et_h.awk" "outfile=${BASE}.h.$$" "outfn=${BASE}.h" "$ROOT.et"
if test -f ${BASE}.h && cmp -s ${BASE}.h.$$ ${BASE}.h ; then
- rm ${BASE}.h.$$
+ rm -f ${BASE}.h.$$
else
- mv ${BASE}.h.$$ ${BASE}.h
+ mv -f ${BASE}.h.$$ ${BASE}.h
+ chmod -w ${BASE}.h
fi
$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c.$$" "outfn=${BASE}.c" "$ROOT.et"
if test -f ${BASE}.c && cmp -s ${BASE}.c.$$ ${BASE}.c ; then
- rm ${BASE}.c.$$
+ rm -f ${BASE}.c.$$
else
- mv ${BASE}.c.$$ ${BASE}.c
+ mv -f ${BASE}.c.$$ ${BASE}.c
+ chmod -w ${BASE}.c
fi
+2006-08-05 Theodore Tso <tytso@mit.edu>
+
+ * mk_cmds.sh.in: Create the generated .c files read-only to remind
+ developers they shouldn't edit them.
+
2005-12-10 Theodore Ts'o <tytso@mit.edu>
* Makefile.in: Add a dependency to make sure that the
exit 1
else
rm -f "${BASE}.c"
- mv "${TMP}" "${BASE}.c"
+ mv -f "${TMP}" "${BASE}.c"
+ chmod -w "${BASE}.c"
exit 0
fi
+2006-08-05 Andreas Dilger <adilger@clusterfs.com>
+
+ * subst.c (main): Create automatically-generated files be
+ read-only in order to remind developers not to end them.
+
2005-10-26 Theodore Ts'o <tytso@mit.edu>
* Makefile.in: Use BUILD_CCFLAGS and BUILD_LDFLAGS instead of
fclose(in);
fclose(out);
if (outfn) {
+ struct stat st;
if (compare_file(outfn, newfn)) {
if (verbose)
printf("No change, keeping %s.\n", outfn);
printf("Creating or replacing %s.\n", outfn);
rename(newfn, outfn);
}
+ /* set read-only to alert user it is a generated file */
+ if (stat(outfn, &st) == 0)
+ chmod(outfn, st.st_mode & ~0222);
}
return (0);
}