Fix rpcgen post-processing for out-of-tree builds
[libguestfs.git] / src / Makefile.am
index 82a4004..28a1b92 100644 (file)
@@ -171,7 +171,7 @@ if HAVE_RPCGEN
 guestfs_protocol.c: guestfs_protocol.x
        rm -f $@-t $@-t2
        $(RPCGEN) -c -o $@-t $(srcdir)/$<
-       sed 's,\.\./\.\./src/,,' < $@-t > $@-t2
+       sed 's,\.\./\(\.\./\)*src,.,' < $@-t > $@-t2
        rm $@-t
        mv $@-t2 $@