From: VMware, Inc <> Date: Thu, 24 Feb 2011 23:01:43 +0000 (-0800) Subject: open-vm-tools: cleanup rpcgen invocations. X-Git-Tag: 2011.02.23-368700~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2cd5451060a51c17501afb03dff9b337327a083;p=thirdparty%2Fopen-vm-tools.git open-vm-tools: cleanup rpcgen invocations. Create a new script that hides most of the mess involved in executing rpcgen from outside the source directory. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index ac9de9895..02a860e24 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -1128,6 +1128,7 @@ VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr # General definitions INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh' +RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh' ### General substs @@ -1158,6 +1159,7 @@ if test "$os" = "freebsd" -a -n "$SYSDIR"; then AC_SUBST([SYSDIR]) fi AC_SUBST([INSTVMSG]) +AC_SUBST([RPCGEN_WRAPPER]) ### Lib substs @@ -1254,7 +1256,8 @@ AC_CONFIG_FILES([ \ tests/testVmblock/Makefile \ docs/Makefile \ docs/api/Makefile \ - scripts/Makefile \ + scripts/Makefile \ + scripts/build/rpcgen_wrapper.sh \ ]) ### diff --git a/open-vm-tools/lib/guestRpc/Makefile.am b/open-vm-tools/lib/guestRpc/Makefile.am index b04f76d6a..b5e78c2c4 100644 --- a/open-vm-tools/lib/guestRpc/Makefile.am +++ b/open-vm-tools/lib/guestRpc/Makefile.am @@ -38,15 +38,8 @@ EXTRA_DIST += nicinfo.x # to copy the sources to the build dir before compiling them. nicinfo.h: nicinfo.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/lib/guestRpc/nicinfo.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/nicinfo.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ nicinfo_xdr.c: nicinfo.x nicinfo.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/nicinfo.x + @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ diff --git a/open-vm-tools/libguestlib/Makefile.am b/open-vm-tools/libguestlib/Makefile.am index 4a0681e8e..0ebe8c6ef 100644 --- a/open-vm-tools/libguestlib/Makefile.am +++ b/open-vm-tools/libguestlib/Makefile.am @@ -60,24 +60,15 @@ pkgconfig_DATA = vmguestlib.pc $(pkgconfig_DATA): $(top_builddir)/config.status guestlibIoctl.h: guestlibIoctl.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/libguestlib/guestlibIoctl.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/guestlibIoctl.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ + @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ + +guestlibIoctl_xdr.c: guestlibIoctl.x guestlibIoctl.h + @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ guestlibV3.h: guestlibV3.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/libguestlib/guestlibV3.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/guestlibV3.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ + @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ guestlibV3_xdr.c: guestlibV3.x guestlibV3.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/guestlibV3.x + @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ -guestlibIoctl_xdr.c: guestlibIoctl.x guestlibIoctl.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/guestlibIoctl.x diff --git a/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in b/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in new file mode 100644 index 000000000..b33696c84 --- /dev/null +++ b/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in @@ -0,0 +1,120 @@ +#!/bin/sh +################################################################################ +### Copyright 2011 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### This program is distributed in the hope that it will be useful, +### but WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +### GNU General Public License for more details. +### +### You should have received a copy of the GNU General Public License +### along with this program; if not, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +# +# rpcgen_wrapper.sh - executes rpcgen. +# +# rpcgen is very finicky in the way it's invoked. It tends to pollute the +# generated files with all sorts of weird stuff if you specify full paths to the +# files being compiled. So this script copies the source file (plus any other +# needed files) to the build directory before invoking rpcgen. +# +# The pattern to use in Makefile.am is: +# +# . have separate rules for generating the header and the source files, both +# invoking rpcgen_wrapper.sh +# . make the source depend on the header +# +# The script assumes that $(builddir) is ".". The generated header is copied +# to the "lib/include" directory under $(top_builddir). +# +# Arguments: +# input ($1): path of .x file, relative to $(top_srcdir) +# output ($2): name of output header file +# extra ($@): other files to copy into the build directory; paths +# relative to $(top_srcdir) +# + +set -e + +rpcgen=@RPCGEN@ +rpcgenflags="@RPCGENFLAGS@" +top_srcdir="@abs_top_srcdir@" +top_builddir="@abs_top_builddir@" +input=$1 +output=$2 + +if [ -z "$output" ]; then + echo "Invalid arguments." >&2 + exit 1 +fi + +shift 2 + +# need_update($target, $source) +need_update() +{ + test ! -f $1 -o $1 -ot $2 +} + + +# do_rpcgen($type) +# type is either "-h" or "-c" +do_rpcgen() +{ + if need_update $output `basename $input`; then + rm -f $output + fi + + $rpcgen $rpcgenflags $1 -o $output `basename $input` + sed 's,rpc/rpc\.h,vmxrpc.h,' $output > ${output}.tmp + mv ${output}.tmp $output +} + + +do_header() +{ + # + # Check both if srcdir != blddir, and also if we're copying a .x file from + # a different component. + # + top_builddir=`cd $top_builddir && pwd` + top_srcdir=`cd $top_srcdir && pwd` + + if test $top_builddir != $top_srcdir -o \ + `pwd` != `dirname $top_builddir/$input`; then + for f in $@; do + if need_update `basename $f` $top_srcdir/$f; then + cp -f $top_srcdir/$f . + fi + done + if need_update `basename $input` $top_srcdir/$input; then + cp -f $top_srcdir/$input . + fi + fi + + do_rpcgen "-h" + + # Export the generated header. + mkdir -p $top_builddir/lib/include/guestrpc + cp $output $top_builddir/lib/include/guestrpc +} + + +do_impl() +{ + do_rpcgen "-c" +} + + +case $output in + *.h) do_header ;; + *.c) do_impl ;; + *) echo "Unknown output file type: $output" ;; +esac + diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.am b/open-vm-tools/services/plugins/dndcp/Makefile.am index c5e17bf74..35c256afd 100644 --- a/open-vm-tools/services/plugins/dndcp/Makefile.am +++ b/open-vm-tools/services/plugins/dndcp/Makefile.am @@ -86,16 +86,9 @@ CLEANFILES += $(BUILT_SOURCES) libdndcp_la_SOURCES += cpFileContents_xdr.c cpFileContents.h: cpFileContents.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/dndcp/cpFileContents.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/cpFileContents.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ cpFileContents_xdr.c: cpFileContents.x cpFileContents.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/cpFileContents.x + @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ diff --git a/open-vm-tools/services/plugins/unity/Makefile.am b/open-vm-tools/services/plugins/unity/Makefile.am index 375ec7361..01220d62a 100644 --- a/open-vm-tools/services/plugins/unity/Makefile.am +++ b/open-vm-tools/services/plugins/unity/Makefile.am @@ -121,154 +121,77 @@ clean-local: fi ghiGetBinaryHandlers.h: ghiGetBinaryHandlers.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiGetBinaryHandlers.x $(builddir);\ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiGetBinaryHandlers.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiGetBinaryHandlers.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiGetBinaryHandlers_xdr.c: ghiGetBinaryHandlers.x ghiGetBinaryHandlers.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiGetBinaryHandlers.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiGetBinaryHandlers.x $@ ghiGetExecInfoHash.h: ghiGetExecInfoHash.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiGetExecInfoHash.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiGetExecInfoHash.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiGetExecInfoHash.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiGetExecInfoHash_xdr.c: ghiGetExecInfoHash.x ghiGetExecInfoHash.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiGetExecInfoHash.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiGetExecInfoHash.x $@ ghiProtocolHandler.h: ghiProtocolHandler.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiProtocolHandler.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiProtocolHandler.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiProtocolHandler.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiProtocolHandler_xdr.c: ghiProtocolHandler.x ghiProtocolHandler.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiProtocolHandler.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiProtocolHandler.x $@ ghiStartMenu.h: ghiStartMenu.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiStartMenu.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiStartMenu.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiStartMenu.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiStartMenu_xdr.c: ghiStartMenu.x ghiStartMenu.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiStartMenu.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiStartMenu.x $@ ghiShellAction.h: ghiShellAction.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiShellAction.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiShellAction.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiShellAction.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiShellAction_xdr.c: ghiShellAction.x ghiShellAction.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiShellAction.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiShellAction.x $@ ghiTrayIcon.h: ghiTrayIcon.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiTrayIcon.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiTrayIcon.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiTrayIcon.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiTrayIcon_xdr.c: ghiTrayIcon.x ghiTrayIcon.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiTrayIcon.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiTrayIcon.x $@ ghiSetFocusedWindow.h: ghiSetFocusedWindow.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiSetFocusedWindow.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiSetFocusedWindow.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetFocusedWindow.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiSetFocusedWindow_xdr.c: ghiSetFocusedWindow.x ghiSetFocusedWindow.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiSetFocusedWindow.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetFocusedWindow.x $@ ghiSetGuestHandler.h: ghiSetGuestHandler.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiSetGuestHandler.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiSetGuestHandler.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetGuestHandler.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiSetGuestHandler_xdr.c: ghiSetGuestHandler.x ghiSetGuestHandler.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiSetGuestHandler.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetGuestHandler.x $@ ghiSetOutlookTempFolder.h: ghiSetOutlookTempFolder.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/ghiCommonDefines.h $(builddir); \ - cp -f $(top_srcdir)/services/plugins/unity/ghiSetOutlookTempFolder.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiSetOutlookTempFolder.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetOutlookTempFolder.x $@ \ + services/plugins/unity/ghiCommonDefines.h ghiSetOutlookTempFolder_xdr.c: ghiSetOutlookTempFolder.x ghiSetOutlookTempFolder.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiSetOutlookTempFolder.x + @RPCGEN_WRAPPER@ services/plugins/unity/ghiSetOutlookTempFolder.x $@ unityActive.h: unityActive.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/unityActive.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/unityActive.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/unityActive.x $@ unityActive_xdr.c: unityActive.x unityActive.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/unityActive.x + @RPCGEN_WRAPPER@ services/plugins/unity/unityActive.x $@ unity.h: unity.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/services/plugins/unity/unity.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/unity.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ - $(MKDIR_P) $(top_builddir)/lib/include/guestrpc - cp $@ $(top_builddir)/lib/include/guestrpc + @RPCGEN_WRAPPER@ services/plugins/unity/unity.x $@ unity_xdr.c: unity.x unity.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/unity.x + @RPCGEN_WRAPPER@ services/plugins/unity/unity.x $@ diff --git a/open-vm-tools/tests/testDebug/Makefile.am b/open-vm-tools/tests/testDebug/Makefile.am index 84a71e5fe..8a8ba0c63 100644 --- a/open-vm-tools/tests/testDebug/Makefile.am +++ b/open-vm-tools/tests/testDebug/Makefile.am @@ -48,11 +48,8 @@ CLEANFILES += testData_xdr.c CLEANFILES += testData.h testData.h: $(top_srcdir)/tests/testPlugin/testData.x - cp -f $(top_srcdir)/tests/testPlugin/testData.x $(builddir) - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/testData.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ + @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ testData_xdr.c: testData.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/testData.x + @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ diff --git a/open-vm-tools/tests/testPlugin/Makefile.am b/open-vm-tools/tests/testPlugin/Makefile.am index 44824c442..34b060c8b 100644 --- a/open-vm-tools/tests/testPlugin/Makefile.am +++ b/open-vm-tools/tests/testPlugin/Makefile.am @@ -51,13 +51,8 @@ EXTRA_DIST = EXTRA_DIST += testData.x testData.h: testData.x - if [ $(top_builddir) != $(top_srcdir) ]; then \ - cp -f $(top_srcdir)/tests/testPlugin/testData.x $(builddir); \ - fi - $(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/testData.x - $(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp - mv $@.tmp $@ + @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ testData_xdr.c: testData.x testData.h - $(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/testData.x + @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@