3 ### Build script for `anag'
5 ### (c) 2001, 2016 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of Anag: a simple wordgame helper.
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.
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.
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.
33 ###--------------------------------------------------------------------------
34 ### Making substitutions.
36 confsubst = $(top_srcdir)/config/confsubst
37 V_SUBST = $(V_SUBST_$(V))
38 V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
39 V_SUBST_0 = @echo " SUBST $@";
40 SUBST = $(V_SUBST)$(confsubst)
42 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
43 DICTIONARY=$(DICTIONARY) \
47 EXTRA_DIST += config/confsubst
49 ###--------------------------------------------------------------------------
53 anag_SOURCES = anag.c anag.h util.c
54 anag_SOURCES += anagram.c
55 anag_SOURCES += longest.c
56 anag_SOURCES += mono.c
57 anag_SOURCES += pcre.c
58 anag_SOURCES += regexp.c
59 anag_SOURCES += trackword.c
60 anag_SOURCES += wildcard.c
62 ###--------------------------------------------------------------------------
66 SUFFIXES += .java .class
67 CLEANFILES += *.class *.jar
68 V_JAVAC = $(V_JAVAC_$(V))
69 V_JAVAC_ = $(V_JAVAC_$(AM_DEFAULT_VERBOSITY))
70 V_JAVAC_0 = @echo " JAVAC $@";
72 V_JAR_ = $(V_JAR_$(AM_DEFAULT_VERBOSITY))
73 V_JAR_0 = @echo " JAR $@";
74 .java.class:; $(V_JAVAC)$(JAVAC) -d . $(JAVACFLAGS) $<
76 javadir = $(datadir)/java
82 EXTRA_DIST += anag.manifest
83 EXTRA_DIST += AnagGUI.java
84 anag.jar: AnagGUI.class
85 $(V_JAR)jar cfm $@ $(srcdir)/anag.manifest *.class
87 ###--------------------------------------------------------------------------
91 bin_SCRIPTS += anag-gui
94 EXTRA_DIST += anag-gui.in
95 CLEANFILES += anag-gui
97 anag-gui: anag-gui.in Makefile
98 $(SUBST) $(srcdir)/anag-gui.in >$@.new $(SUBSTITUTIONS) && \
99 chmod +x $@.new && mv $@.new $@
101 ###--------------------------------------------------------------------------
102 ### Distribution arrangements.
104 ## Version number tracking.
106 echo $(VERSION) >$(distdir)/RELEASE
108 EXTRA_DIST += config/auto-version
110 ## Zip file for DOSish platforms.
113 zip -qlr $(PACKAGE).zip $(distdir)
117 EXTRA_DIST += debian/control debian/changelog debian/copyright
118 EXTRA_DIST += debian/rules debian/compat debian/source/format
119 EXTRA_DIST += debian/anag.install
120 EXTRA_DIST += debian/anag-gui-java.install
121 EXTRA_DIST += debian/anag-gui-java.postinst
122 EXTRA_DIST += debian/anag-gui-java.prerm
123 EXTRA_DIST += debian/anag-gui.java
124 EXTRA_DIST += debian/anag-gui-tk.install
125 EXTRA_DIST += debian/anag-gui-tk.postinst
126 EXTRA_DIST += debian/anag-gui-tk.prerm
128 ##----- That's all, folks ---------------------------------------------------