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