Makefile.am, configure.ac: Spring-clean the build system.
[xtoys] / Makefile.am
... / ...
CommitLineData
1### -*-makefile-*-
2###
3### Makefile for X tools
4###
5### (c) 1998 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the Edgeware X tools collection.
11###
12### X tools is free software; you can redistribute it and/or modify
13### it under the terms of the GNU General Public License as published by
14### the Free Software Foundation; either version 2 of the License, or
15### (at your option) any later version.
16###
17### X tools is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU General Public License for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with X tools; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26bin_PROGRAMS =
27bin_SCRIPTS =
28dist_man_MANS =
29EXTRA_DIST =
30CLEANFILES =
31
32confsubst = $(srcdir)/config/confsubst
33EXTRA_DIST += config/confsubst
34
35V_SUBST = $(V_SUBST_$(V))
36V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
37V_SUBST_0 = @echo " SUBST $@";
38SUBST = $(V_SUBST)$(confsubst)
39
40SUBSTITUTIONS = \
41 PYTHON=$(PYTHON) VERSION=$(VERSION)
42
43###--------------------------------------------------------------------------
44### Simple tools in C.
45
46AM_CFLAGS = $(X_CFLAGS)
47LDADD = -lX11 $(X_LIBS)
48
49## xscsize.
50bin_PROGRAMS += xscsize
51dist_man_MANS += xscsize.1
52xscsize_SOURCES = xscsize.c
53
54## xatom.
55bin_PROGRAMS += xatom
56dist_man_MANS += xatom.1
57xatom_SOURCES = xatom.c
58xatom_SOURCES += libxatom.h libxatom.c
59
60###--------------------------------------------------------------------------
61### Graphical tools in Python.
62
63if HAVE_PYGTK
64
65python_PYTHON =
66
67## Common code.
68python_PYTHON += xtoys.py
69
70## xmsg.
71bin_SCRIPTS += xmsg
72CLEANFILES += xmsg
73EXTRA_DIST += xmsg.in
74dist_man_MANS += xmsg.1
75
76xmsg: xmsg.in Makefile
77 $(SUBST) $(srcdir)/xmsg.in >$@.new $(SUBSTITUTIONS) && \
78 chmod +x $@.new && mv $@.new $@
79
80## xcatch.
81bin_SCRIPTS += xcatch
82CLEANFILES += xcatch
83EXTRA_DIST += xcatch.in
84dist_man_MANS += xcatch.1
85
86xcatch: xcatch.in Makefile
87 $(SUBST) $(srcdir)/xcatch.in >$@.new $(SUBSTITUTIONS) && \
88 chmod +x $@.new && mv $@.new $@
89
90## xgetline.
91bin_SCRIPTS += xgetline
92CLEANFILES += xgetline
93EXTRA_DIST += xgetline.in
94dist_man_MANS += xgetline.1
95
96xgetline: xgetline.in Makefile
97 $(SUBST) $(srcdir)/xgetline.in >$@.new $(SUBSTITUTIONS) && \
98 chmod +x $@.new && mv $@.new $@
99
100endif
101
102###--------------------------------------------------------------------------
103### Distribution arrangements.
104
105dist-hook::
106 echo $(VERSION) >$(distdir)/RELEASE
107
108EXTRA_DIST += config/auto-version
109
110
111###--------------------------------------------------------------------------
112### Debian.
113
114EXTRA_DIST += debian/rules
115EXTRA_DIST += debian/control
116EXTRA_DIST += debian/copyright
117EXTRA_DIST += debian/changelog
118
119EXTRA_DIST += debian/xtoys.install
120
121EXTRA_DIST += debian/xtoys-gtk.install
122
123###----- That's all, folks --------------------------------------------------