chiark / gitweb /
Adjust --version output to more closely match GNU standards
[disorder] / lib / Makefile.am
CommitLineData
460b9539 1#
2# This file is part of DisOrder.
f486ea18 3# Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
460b9539 4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18# USA
19#
20
0b861e97 21noinst_LIBRARIES=libdisorder.a
460b9539 22include_HEADERS=disorder.h
23noinst_PROGRAMS=test
24
0b861e97 25libdisorder_a_SOURCES=charset.c charset.h \
460b9539 26 addr.c addr.h \
27 authhash.c authhash.h \
28 basen.c basen.h \
fce810c2 29 base64.c base64.h \
460b9539 30 cache.c cache.h \
31 client.c client.h \
32 client-common.c client-common.h \
33 configuration.c configuration.h \
b12be54a 34 cookies.c cookies.h \
460b9539 35 defs.c defs.h \
36 eclient.c eclient.h \
37 event.c event.h \
38 eventlog.c eventlog.h \
39 filepart.c filepart.h \
40 hash.c hash.h \
22168975 41 heap.h \
460b9539 42 hex.c hex.h \
bb6ae3fb 43 hostname.c hostname.h \
81b1bf12 44 ifreq.c ifreq.h \
460b9539 45 inputline.c inputline.h \
46 kvp.c kvp.h \
47 log.c log.h log-impl.h \
48 logfd.c logfd.h \
49 mem.c mem.h mem-impl.h \
50 mime.h mime.c \
b25aac59 51 mixer.c mixer.h mixer-oss.c mixer-alsa.c \
460b9539 52 plugin.c plugin.h \
53 printf.c printf.h \
54 asprintf.c fprintf.c snprintf.c \
55 queue.c queue.h \
56 regsub.c regsub.h \
938d8157 57 rights.c queue-rights.c rights.h \
e83d0967 58 rtp.h \
460b9539 59 selection.c selection.h \
bb6ae3fb 60 sendmail.c sendmail.h \
460b9539 61 signame.c signame.h \
62 sink.c sink.h \
ea410ba1 63 speaker-protocol.c speaker-protocol.h \
460b9539 64 split.c split.h \
65 syscalls.c syscalls.h \
66 types.h \
67 table.c table.h \
e83d0967 68 timeval.h \
f0feb22e 69 trackdb.h trackdb.c trackdb-int.h \
460b9539 70 trackname.c trackname.h \
36bde473 71 url.h url.c \
460b9539 72 user.h user.c \
e5a5a138 73 unicode.h unicode.c \
61507e3c 74 unidata.h unidata.c \
460b9539 75 vacopy.h \
76 vector.c vector.h \
3fbdc96d 77 version.c version.h \
ce6c36be 78 wav.h wav.c \
460b9539 79 wstat.c wstat.h \
80 disorder.h
460b9539 81
a05e4467
RK
82version-string: ../config.status ${top_srcdir}/scripts/make-version-string
83 CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
84 @if cmp $@.new $@; then \
85 echo rm -f $@.new; rm -f $@.new; else \
86 echo mv $@.new $@; mv $@.new $@; fi
87
3fbdc96d 88versionstring.h: version-string ${top_srcdir}/scripts/text2c
a05e4467
RK
89 ${top_srcdir}/scripts/text2c -extern disorder_version_string \
90 version-string > $@.new
91 @if cmp $@.new $@; then \
92 echo rm -f $@.new; rm -f $@.new; else \
93 echo mv $@.new $@; mv $@.new $@; fi
94
460b9539 95definitions.h: Makefile
96 rm -f $@.new
97 echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
98 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
99 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
100 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
e83d0967
RK
101 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
102 echo "#define BINDIR \"${bindir}/\"" >> $@.new
103 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
f486ea18 104 echo "#define DOCDIR \"${docdir}/\"" >> $@.new
66ec39ed
RK
105 @if cmp $@.new $@; then \
106 echo rm -f $@.new; rm -f $@.new; else \
107 echo mv $@.new $@; mv $@.new $@; fi
3fbdc96d
RK
108defs.o: definitions.h versionstring.h
109defs.lo: definitions.h versionstring.h
460b9539 110
b90f122b
RK
111test_SOURCES=test.c memgc.c test.h t-addr.c t-basen.c t-cache.c \
112 t-casefold.c t-cookies.c t-filepart.c t-hash.c t-heap.c \
113 t-hex.c t-kvp.c t-mime.c t-printf.c t-regsub.c t-selection.c \
114 t-signame.c t-sink.c t-split.c t-unicode.c t-url.c t-utf8.c \
115 t-words.c t-wstat.c
fe575537 116test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
0b861e97 117test_DEPENDENCIES=libdisorder.a
460b9539 118
033fd4e3 119check: test #test.i
460b9539 120 ./test
121
fbd54d8e
RK
122check-report: before-check check make-coverage-reports
123before-check:
124 rm -f *.gcda *.gcov
125make-coverage-reports:
3d853cec 126 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
fbd54d8e 127
e5a5a138
RK
128rebuild-unicode:
129 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
130
033fd4e3
RK
131%.i: %.c
132 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
133 mv $@.new $@
134
66ec39ed 135CLEANFILES=definitions.h definitions.h.new