]> xenbits.xensource.com Git - libvirt.git/commitdiff
make generated qemud/*.[ch] files read-only
authorJim Meyering <meyering@redhat.com>
Tue, 28 Oct 2008 17:48:11 +0000 (17:48 +0000)
committerJim Meyering <meyering@redhat.com>
Tue, 28 Oct 2008 17:48:11 +0000 (17:48 +0000)
* qemud/Makefile.am (.x.c): Rewrite not to write directly to $@,
and to make generated files read-only.
(.x.h): Likewise.

ChangeLog
qemud/Makefile.am

index e3cf7cd3b5a93a1f54a7ecaf0554e7090301f71f..1ac85e564bf974c670d08fdb5d4848859de4263c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Oct 28 13:46:50 +0100 2008 Jim Meyering <meyering@redhat.com>
+
+       make generated qemud/*.[ch] files read-only
+       * qemud/Makefile.am (.x.c): Rewrite not to write directly to $@,
+       and to make generated files read-only.
+       (.x.h): Likewise.
+
 Tue Oct 28 13:29:14 +0100 2008 Jim Meyering <meyering@redhat.com>
 
        avoid compiler warning when all storage backends are disabled
index 56275f61106341404b15123991a8d9173d152521..dd4c128c53d475012778079e0797d8b68bb3f045 100644 (file)
@@ -34,18 +34,21 @@ EXTRA_DIST =                                                \
 if RPCGEN
 SUFFIXES = .x
 .x.c:
-       rm -f $@
-       rpcgen -c -o $@ $<
+       rm -f $@ $@-t $@-t2
+       rpcgen -c -o $@-t $<
 if GLIBC_RPCGEN
-       mv $@ $@.bak
-       perl -w rpcgen_fix.pl < $@.bak > $@
+       perl -w rpcgen_fix.pl $@-t > $@-t2
+       chmod 444 $@-t2
+       mv $@-t2 $@
 endif
 
 .x.h:
-       rm -f $@
-       rpcgen -h -o $@ $<
+       rm -f $@ $@-t
+       rpcgen -h -o $@-t $<
 if GLIBC_RPCGEN
-       perl -i -p -e 's/\t/        /g' $@
+       perl -pi -e 's/\t/        /g' $@-t
+       chmod 444 $@-t
+       mv $@-t $@
 endif
 endif