### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
-###
+###
### X tools 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 X tools; if not, write to the Free Software Foundation,
### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
EXTRA_DIST =
CLEANFILES =
+confsubst = $(srcdir)/config/confsubst
+EXTRA_DIST += config/confsubst
+
###--------------------------------------------------------------------------
### Distribution arrangements.
dist-hook::
echo $(VERSION) >$(distdir)/RELEASE
+EXTRA_DIST += config/auto-version
+
###--------------------------------------------------------------------------
### Simple tools in 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.
EXTRA_DIST += debian/rules
EXTRA_DIST += debian/xtoys.install
+EXTRA_DIST += debian/xtoys-gtk.install
+
###----- That's all, folks --------------------------------------------------