[libvirt] [PATCH] Fix invocation of rpcgen

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

 



Currently if rpcgen != glibc's rpcgen, then it gets a bit confused
with the temporary files.  Also it's best to call the rpcgen that
configure detected and not some random rpcgen that happens to be in
the path.

The attached patch fixes this.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
Index: qemud/Makefile.am
===================================================================
RCS file: /data/cvs/libvirt/qemud/Makefile.am,v
retrieving revision 1.70
diff -u -r1.70 Makefile.am
--- qemud/Makefile.am	8 Jan 2009 20:42:01 -0000	1.70
+++ qemud/Makefile.am	12 Jan 2009 16:20:11 -0000
@@ -1,5 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
+RPCGEN = @RPCGEN@
+
 DAEMON_SOURCES =					\
 		event.c event.h				\
 		qemud.c qemud.h				\
@@ -37,23 +39,28 @@
 # including <config.h> before "remote_protocol.h".
 .x.c:
 	rm -f $@ $@-t $@-t1 $@-t2
-	rpcgen -c -o $@-t $<
+	$(RPCGEN) -c -o $@-t $<
 	(echo '#include <config.h>'; cat $@-t) > $@-t1
 if GLIBC_RPCGEN
 	perl -w rpcgen_fix.pl $@-t1 > $@-t2
 	rm $@-t1
 	chmod 444 $@-t2
 	mv $@-t2 $@
+else
+	chmod 444 $@-t1
+	mv $@-t1 $@
 endif
+	rm -f $@-t $@-t1 $@-t2
 
 .x.h:
 	rm -f $@ $@-t
-	rpcgen -h -o $@-t $<
+	$(RPCGEN) -h -o $@-t $<
 if GLIBC_RPCGEN
 	perl -pi -e 's/\t/        /g' $@-t
+endif
 	chmod 444 $@-t
 	mv $@-t $@
-endif
+	rm -f $@-t
 endif
 
 remote_protocol.c: remote_protocol.h
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]