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