906a41ee5e0d3380f88889d6ae4edfefefe50d71
[jog] / sounds / Makefile.m4
1 ## -*-makefile-*-
2 ##
3 ## $Id: Makefile.m4,v 1.1 2002/02/02 19:18:01 mdw Exp $
4 ##
5 ## Makefile for sounds subdirectory
6 ##
7 ## (c) 2002 Mark Wooding
8 ##
9
10 ##----- Licensing notice ----------------------------------------------------
11 ##
12 ## This file is part of Jog: Programming for a jogging machine.
13 ##
14 ## Jog is free software; you can redistribute it and/or modify
15 ## it under the terms of the GNU General Public License as published by
16 ## the Free Software Foundation; either version 2 of the License, or
17 ## (at your option) any later version.
18 ##
19 ## Jog is distributed in the hope that it will be useful,
20 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ## GNU General Public License for more details.
23 ##
24 ## You should have received a copy of the GNU General Public License
25 ## along with Jog; if not, write to the Free Software Foundation,
26 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
28 ##----- Revision history ----------------------------------------------------
29 ##
30 ## $Log: Makefile.m4,v $
31 ## Revision 1.1 2002/02/02 19:18:01 mdw
32 ## Construct text `samples' automatically.
33 ##
34
35 AUTOMAKE_OPTIONS = foreign
36
37 changecom
38 changequote([[, ]])
39 define([[getsamples]], [[dnl
40 sed '/^[ ]*\($$2\|#\)/d' <$3SAMPLES | dnl
41 while read tag msg; do $1; done]])
42
43 audiodir = @audiodir@
44
45 ## SAMPLES = syscmd(getsamples([[echo -n " \\
46 $tag.wav"]]))
47 SAMPLES =
48 TXTSAMPLES = syscmd(getsamples([[echo -n " \\
49 $tag.txt"]]))
50
51 audio_DATA = $(SAMPLES) $(TXTSAMPLES)
52
53 EXTRA_DIST = \
54 $(audio_DATA) SAMPLES Makefile.m4
55
56 $(TXTSAMPLES): txtsamples.stamp
57
58 txtsamples.stamp: SAMPLES
59 getsamples([[echo "$$msg" >$$tag.txt]], [[$]], [[$(srcdir)/]])
60 echo timestamp >txtsamples.stamp
61
62 Makefile.am: Makefile.m4 SAMPLES
63 cd $(srcdir) && m4 Makefile.m4 >Makefile.am
64
65 CLEANFILES = $(TXTSAMPLES) txtsamples.stamp
66
67 ##----- That's all, folks ---------------------------------------------------