chiark / gitweb /
Quick lick of paint before we really get started.
[anag] / Makefile.am
CommitLineData
0279756e
MW
1### -*-makefile-*-
2###
3### Build script for `anag'
4###
5### (c) 2001, 2016 Mark Wooding
6###
0484a0d9 7
0279756e
MW
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of Anag: a simple wordgame helper.
11###
12### Anag 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### Anag 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 Anag; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26EXTRA_DIST =
27CLEANFILES =
28SUFFIXES =
29
30bin_PROGRAMS =
31bin_SCRIPTS =
32
33###--------------------------------------------------------------------------
34### Making substitutions.
35
36confsubst = $(top_srcdir)/config/confsubst
37V_SUBST = $(V_SUBST_$(V))
38V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
39V_SUBST_0 = @echo " SUBST $@";
40SUBST = $(V_SUBST)$(confsubst)
41SUBSTITUTIONS = \
42 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
43 DICTIONARY=$(DICTIONARY) \
44 WISH=$(WISH) \
45 ANAG=$(bindir)/anag
46
47EXTRA_DIST += config/confsubst
48
49###--------------------------------------------------------------------------
50### Main program.
51
52bin_PROGRAMS += anag
53anag_SOURCES = anag.c anag.h util.c
54anag_SOURCES += anagram.c
55anag_SOURCES += longest.c
56anag_SOURCES += mono.c
57anag_SOURCES += pcre.c
58anag_SOURCES += regexp.c
59anag_SOURCES += trackword.c
60anag_SOURCES += wildcard.c
61
62###--------------------------------------------------------------------------
63### Java frontend.
0484a0d9 64
0279756e
MW
65JAVAC = @JAVAC@
66SUFFIXES += .java .class
67CLEANFILES += *.class *.jar
68V_JAVAC = $(V_JAVAC_$(V))
69V_JAVAC_ = $(V_JAVAC_$(AM_DEFAULT_VERBOSITY))
70V_JAVAC_0 = @echo " JAVAC $@";
71V_JAR = $(V_JAR_$(V))
72V_JAR_ = $(V_JAR_$(AM_DEFAULT_VERBOSITY))
73V_JAR_0 = @echo " JAR $@";
74.java.class:; $(V_JAVAC)$(JAVAC) -d . $(JAVACFLAGS) $<
dc460403 75
0279756e 76javadir = $(datadir)/java
6e403221 77
0279756e
MW
78if HAVE_JAVAC
79java_DATA = anag.jar
80endif
e439a998 81
0279756e
MW
82EXTRA_DIST += anag.manifest
83EXTRA_DIST += AnagGUI.java
dc460403 84anag.jar: AnagGUI.class
0279756e
MW
85 $(V_JAR)jar cfm $@ $(srcdir)/anag.manifest *.class
86
87###--------------------------------------------------------------------------
88### Tcl/Tk frontend.
89
90if HAVE_WISH
91bin_SCRIPTS += anag-gui
92endif
93
94EXTRA_DIST += anag-gui.in
95CLEANFILES += anag-gui
96
97anag-gui: anag-gui.in Makefile
98 $(SUBST) $(srcdir)/anag-gui.in >$@.new $(SUBSTITUTIONS) && \
99 chmod +x $@.new && mv $@.new $@
f7ebae38 100
0279756e
MW
101###--------------------------------------------------------------------------
102### Distribution arrangements.
103
104## Version number tracking.
105dist-hook:
106 echo $(VERSION) >$(distdir)/RELEASE
107
108EXTRA_DIST += config/auto-version
109
110## Zip file for DOSish platforms.
f7ebae38 111doszip: distdir
112 rm -f $(PACKAGE).zip
113 zip -qlr $(PACKAGE).zip $(distdir)
114 rm -rf $(distdir)
dc460403 115
0279756e
MW
116## Debian packaging.
117EXTRA_DIST += debian/control debian/changelog debian/copyright
118EXTRA_DIST += debian/rules debian/compat debian/source/format
119EXTRA_DIST += debian/anag.install
120EXTRA_DIST += debian/anag-gui-java.install
121EXTRA_DIST += debian/anag-gui-java.postinst
122EXTRA_DIST += debian/anag-gui-java.prerm
123EXTRA_DIST += debian/anag-gui.java
124EXTRA_DIST += debian/anag-gui-tk.install
125EXTRA_DIST += debian/anag-gui-tk.postinst
126EXTRA_DIST += debian/anag-gui-tk.prerm
dc460403 127
6e403221 128##----- That's all, folks ---------------------------------------------------