chiark / gitweb /
Rewrite graphical tools in Python.
[xtoys] / Makefile.am
index 14d29edd88c8b3602bc2d512a05a007ecdc68154..ffdd4071a6efe7859b73ac3be62c367b62ac641f 100644 (file)
@@ -29,6 +29,9 @@ dist_man_MANS          =
 EXTRA_DIST              =
 CLEANFILES              =
 
+confsubst = $(srcdir)/config/confsubst
+EXTRA_DIST             += config/confsubst
+
 ###--------------------------------------------------------------------------
 ### Distribution arrangements.
 
@@ -56,6 +59,57 @@ xatom_SOURCES                 =
 xatom_SOURCES          += xatom.c
 xatom_SOURCES          += libxatom.h libxatom.c
 
+###--------------------------------------------------------------------------
+### Graphical tools in Python.
+
+if HAVE_PYGTK
+
+python_PYTHON           =
+
+## Common code.
+python_PYTHON          += xtoys.py
+
+## xmsg
+bin_SCRIPTS            += xmsg
+CLEANFILES             += xmsg
+EXTRA_DIST             += xmsg.in
+
+dist_man_MANS          += xmsg.1
+
+xmsg: xmsg.in Makefile
+       $(confsubst) $(srcdir)/xmsg.in >$@.new \
+               PYTHON=$(PYTHON) VERSION=$(VERSION)
+       chmod +x $@.new
+       mv $@.new $@
+
+## xcatch
+bin_SCRIPTS            += xcatch
+CLEANFILES             += xcatch
+EXTRA_DIST             += xcatch.in
+
+dist_man_MANS          += xcatch.1
+
+xcatch: xcatch.in Makefile
+       $(confsubst) $(srcdir)/xcatch.in >$@.new \
+               PYTHON=$(PYTHON) VERSION=$(VERSION)
+       chmod +x $@.new
+       mv $@.new $@
+
+## xgetline
+bin_SCRIPTS            += xgetline
+CLEANFILES             += xgetline
+EXTRA_DIST             += xgetline.in
+
+dist_man_MANS          += xgetline.1
+
+xgetline: xgetline.in Makefile
+       $(confsubst) $(srcdir)/xgetline.in >$@.new \
+               PYTHON=$(PYTHON) VERSION=$(VERSION)
+       chmod +x $@.new
+       mv $@.new $@
+
+endif
+
 ###--------------------------------------------------------------------------
 ### Debian.
 
@@ -66,4 +120,6 @@ EXTRA_DIST           += debian/changelog
 
 EXTRA_DIST             += debian/xtoys.install
 
+EXTRA_DIST             += debian/xtoys-gtk.install
+
 ###----- That's all, folks --------------------------------------------------