chiark / gitweb /
Change James's email address
[sympathy.git] / Makefile.am
1 #
2 #
3 # Makefile.am:
4 #
5 # Copyright (c) 2008 James McKenzie <sympathy@madingley.org>,
6 # All rights reserved.
7 #
8 # $Id: Makefile.am,v 1.8 2008/02/28 22:55:27 staffcvs Exp $
9 #
10 # $Log: Makefile.am,v $
11 # Revision 1.8  2008/02/28 22:55:27  staffcvs
12 # *** empty log message ***
13 #
14 # Revision 1.7  2008/02/27 18:29:49  james
15 # *** empty log message ***
16 #
17 # Revision 1.6  2008/02/27 16:01:24  james
18 # *** empty log message ***
19 #
20 # Revision 1.5  2008/02/27 15:17:55  james
21 # *** empty log message ***
22 #
23 # Revision 1.4  2008/02/27 15:04:32  james
24 # *** empty log message ***
25 #
26 # Revision 1.3  2008/02/27 10:47:34  james
27 # *** empty log message ***
28 #
29 # Revision 1.2  2008/02/24 00:42:52  james
30 # *** empty log message ***
31 #
32 # Revision 1.1  2008/02/03 16:20:23  james
33 # *** empty log message ***
34 #
35 #
36 #
37 #
38 SUBDIRS=src apps test 
39
40 man1_MANS=sympathy.man
41
42 bin_SCRIPTS = libsympathy-config
43
44 clean-local:
45         -rm -f libsympathy-config version.sed sympathy.man
46
47 sympathy.man: sympathy.1 version.sed 
48         @SED@ -f version.sed < sympathy.1 > sympathy.man || rm -f sympathy.man
49
50
51 libsympathy-config.src:libsympathy-config.src.in
52 libsympathy-config:libsympathy-config.src version.sed
53         @SED@ -f version.sed < libsympathy-config.src > libsympathy-config || rm -f libsympathy-config
54         chmod +x $@
55         
56
57 VFD=${srcdir}
58 VF=${shell cat ${VFD}/version-files}
59 VFS=${VF:%=${VFD}/%}
60 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
61 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
62 VSTP=${shell @GREP@ ${VCHK} ${VFD}/version-stamps  | @AWK@  'BEGIN { FS="\t" }; { print $$2 }'  }
63 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
64 VSDF=${shell tail -1 ${VFD}/version-stamps  | @AWK@  'BEGIN { FS="\t" }; { print $$2 }'  }
65
66 EXTRA_DIST=version-files version-major version-minor version-micro version-md5sums version-stamps sympathy.1
67
68 version.sed: $(VFD)/version-files $(VFD)/version-major \
69         $(VFD)/version-minor $(VFD)/version-micro \
70         $(VFD)/version-md5sums $(VFD)/version-stamps ${VFS} 
71         if [ .${VNUM} = . ]; then \
72                 echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
73                 echo "s/%VERSIONSTAMP%/After ${VSDF}/g" >> version.sed; \
74                 echo "s/%LONGVERSION%/Version ${VDEF} + Edits/g" >> version.sed; \
75         else \
76                 echo "s/%VERSION%/${VNUM}/g" > version.sed; \
77                 echo "s/%VERSIONSTAMP%/${VSTP}/g" >> version.sed; \
78                 echo "s/%LONGVERSION%/Version ${VNUM}/g" >> version.sed; \
79         fi
80
81 protos:
82         (cd src && ${MAKE} protos)
83
84 tidy:
85         cvs commit -m ""
86         (cd src && ${MAKE} tidy)
87         (cd apps && ${MAKE} tidy)
88
89