Guestfish feature: remote control of guestfish over a pipe.
[libguestfs.git] / fish / Makefile.am
index 03619f3..5255e85 100644 (file)
@@ -29,10 +29,29 @@ guestfish_SOURCES = \
        glob.c \
        lcd.c \
        more.c \
+       rc.c \
+       rc_protocol.c \
+       rc_protocol.h \
        reopen.c \
        time.c
 
+BUILT_SOURCES = \
+       rc_protocol.c \
+       rc_protocol.h
+
 guestfish_CFLAGS = \
        -I$(top_srcdir)/src -I$(top_builddir)/src -Wall \
        -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
 guestfish_LDADD = $(top_builddir)/src/libguestfs.la $(LIBREADLINE)
+
+if HAVE_RPCGEN
+rc_protocol.c: rc_protocol.x
+       rm -f $@-t
+       $(RPCGEN) -c -o $@-t $<
+       mv $@-t $@
+
+rc_protocol.h: rc_protocol.x
+       rm -f $@-t
+       $(RPCGEN) -h -o $@-t $<
+       mv $@-t $@
+endif