chiark / gitweb /
*** empty log message ***
[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.5  2008/02/27 15:17:55  james
12 # *** empty log message ***
13 #
14 # Revision 1.4  2008/02/27 15:04:32  james
15 # *** empty log message ***
16 #
17 # Revision 1.3  2008/02/27 10:47:34  james
18 # *** empty log message ***
19 #
20 # Revision 1.2  2008/02/24 00:42:52  james
21 # *** empty log message ***
22 #
23 # Revision 1.1  2008/02/03 16:20:23  james
24 # *** empty log message ***
25 #
26 #
27 #
28 #
29 SUBDIRS=src apps test 
30
31 man1_MANS=sympathy.man
32
33 bin_SCRIPTS = libsympathy-config
34
35 clean-local:
36         -rm -f libsympathy-config version.sed sympathy.man
37
38 sympathy.man: sympathy.man.src version.sed 
39         @SED@ -f version.sed < sympathy.man.src > sympathy.man || rm -f sympathy.man
40
41
42 libsympathy-config.src:libsympathy-config.src.in
43 libsympathy-config:libsympathy-config.src version.sed
44         @SED@ -f version.sed < libsympathy-config.src > libsympathy-config || rm -f libsympathy-config
45         chmod +x $@
46         
47
48 VFD=${srcdir}
49 VF=${shell cat ${VFD}/version-files}
50 VFS=${VF:%=${VFD}/%}
51 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
52 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
53 VSTP=${shell @GREP@ ${VCHK} ${VFD}/version-stamps  | @AWK@ '{ print $$2 }'  }
54 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
55
56 EXTRA_DIST=version-files version-major version-minor version-micro version-md5sums version-stamps
57
58 version.sed: $(VFD)/version-files $(VFD)/version-major \
59         $(VFD)/version-minor $(VFD)/version-micro \
60         $(VFD)/version-md5sums $(VFD)/version-stamps ${VFS} Makefile
61         if [ .${VNUM} = . ]; then \
62                 echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
63                 echo "s/%VERSION%/After ${VSTP}/g" > version.sed; \
64         else \
65                 echo "s/%VERSION%/${VNUM}/g" > version.sed; \
66                 echo "s/%VERSIONSTAMP%/${VSTP}/g" > version.sed; \
67         fi
68
69 protos:
70         (cd src && ${MAKE} protos)
71
72 tidy:
73         cvs commit -m ""
74         (cd src && ${MAKE} tidy)
75         (cd apps && ${MAKE} tidy)
76
77