aboutsummaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index d3e10bb..4084cba 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,10 +2,21 @@
noinst_PROGRAMS = mock-cups-notifier
DISTCLEANFILES = mock-cups-notifier
+cups_notifier_sources = \
+ cups-notifier.c \
+ cups-notifier.h
+
+$(cups_notifier_sources): $(top_srcdir)/src/org.cups.cupsd.Notifier.xml
+ gdbus-codegen \
+ --interface-prefix org.cups.cupsd \
+ --c-namespace Cups \
+ --generate-c-code cups-notifier \
+ $^
+
mock_cups_notifier_SOURCES = \
- mock-cups-notifier.c \
- $(top_builddir)/src/cups-notifier.c \
- $(top_builddir)/src/cups-notifier.h
+ mock-cups-notifier.c
+
+nodist_mock_cups_notifier_SOURCES = $(cups_notifier_sources)
mock_cups_notifier_CPPFLAGS = \
$(SERVICE_CFLAGS) \
@@ -13,3 +24,6 @@ mock_cups_notifier_CPPFLAGS = \
mock_cups_notifier_LDADD = $(SERVICE_LIBS)
+BUILT_SOURCES = $(cups_notifier_sources)
+CLEANFILES = $(BUILT_SOURCES)
+