chiark / gitweb /
3022ef0bc91cc7ab56c3ef851396bbd331947dab
[sympathy.git] / Makefile.am
1 #
2 #
3 # Makefile.am:
4 #
5 # Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
6 # All rights reserved.
7 #
8 # $Id$
9 #
10 # $Log$
11 # Revision 1.4  2008/02/27 15:04:32  james
12 # *** empty log message ***
13 #
14 # Revision 1.3  2008/02/27 10:47:34  james
15 # *** empty log message ***
16 #
17 # Revision 1.2  2008/02/24 00:42:52  james
18 # *** empty log message ***
19 #
20 # Revision 1.1  2008/02/03 16:20:23  james
21 # *** empty log message ***
22 #
23 #
24 #
25 #
26 SUBDIRS=src apps test 
27
28 man1_MANS=sympathy.man
29
30 bin_SCRIPTS = libsympathy-config
31
32 clean-local:
33         -rm -f libsympathy-config version.sed
34
35 libsympathy-config.src:libsympathy-config.src.in
36 libsympathy-config:libsympathy-config.src version.sed
37         @SED@ -f version.sed < libsympathy-config.src > libsympathy-config || rm -f libsympathy-config
38         chmod +x $@
39         
40
41 VFD=${srcdir}
42 VF=${shell cat ${VFD}/version-files}
43 VFS=${VF:%=${VFD}/%}
44 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
45 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
46 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
47
48 EXTRA_DIST=version-files version-major version-minor version-micro version-md5sums
49
50 version.sed: $(VFD)/version-files $(VFD)/version-major \
51         $(VFD)/version-minor $(VFD)/version-micro \
52         $(VFD)/version-md5sums ${VFS} Makefile
53         if [ .${VNUM} = . ]; then \
54                 echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
55         else \
56                 echo "s/%VERSION%/${VNUM}/g" > version.sed; \
57         fi
58
59 protos:
60         (cd src && ${MAKE} protos)
61
62 tidy:
63         cvs commit -m ""
64         (cd src && ${MAKE} tidy)
65         (cd apps && ${MAKE} tidy)
66
67