aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
blob: fcd4a41e9c0401a784490bf860d0382fbcbbbf06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
#
# Makefile.am:
#
# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
# All rights reserved.
#
# $Id$
#
# $Log$
# Revision 1.8  2008/02/28 22:55:27  staffcvs
# *** empty log message ***
#
# Revision 1.7  2008/02/27 18:29:49  james
# *** empty log message ***
#
# Revision 1.6  2008/02/27 16:01:24  james
# *** empty log message ***
#
# Revision 1.5  2008/02/27 15:17:55  james
# *** empty log message ***
#
# Revision 1.4  2008/02/27 15:04:32  james
# *** empty log message ***
#
# Revision 1.3  2008/02/27 10:47:34  james
# *** empty log message ***
#
# Revision 1.2  2008/02/24 00:42:52  james
# *** empty log message ***
#
# Revision 1.1  2008/02/03 16:20:23  james
# *** empty log message ***
#
#
#
#
SUBDIRS=src apps test 

man1_MANS=sympathy.man

bin_SCRIPTS = libsympathy-config

clean-local:
	-rm -f libsympathy-config version.sed sympathy.man

sympathy.man: sympathy.1 version.sed 
	@SED@ -f version.sed < sympathy.1 > sympathy.man || rm -f sympathy.man


libsympathy-config.src:libsympathy-config.src.in
libsympathy-config:libsympathy-config.src version.sed
	@SED@ -f version.sed < libsympathy-config.src > libsympathy-config || rm -f libsympathy-config
	chmod +x $@
	

VFD=${srcdir}
VF=${shell cat ${VFD}/version-files}
VFS=${VF:%=${VFD}/%}
VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
VSTP=${shell @GREP@ ${VCHK} ${VFD}/version-stamps  | @AWK@  'BEGIN { FS="\t" }; { print $$2 }'  }
VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
VSDF=${shell tail -1 ${VFD}/version-stamps  | @AWK@  'BEGIN { FS="\t" }; { print $$2 }'  }

EXTRA_DIST=version-files version-major version-minor version-micro version-md5sums version-stamps sympathy.1

version.sed: $(VFD)/version-files $(VFD)/version-major \
	$(VFD)/version-minor $(VFD)/version-micro \
	$(VFD)/version-md5sums $(VFD)/version-stamps ${VFS} 
	if [ .${VNUM} = . ]; then \
		echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
		echo "s/%VERSIONSTAMP%/After ${VSDF}/g" >> version.sed; \
		echo "s/%LONGVERSION%/Version ${VDEF} + Edits/g" >> version.sed; \
	else \
		echo "s/%VERSION%/${VNUM}/g" > version.sed; \
		echo "s/%VERSIONSTAMP%/${VSTP}/g" >> version.sed; \
		echo "s/%LONGVERSION%/Version ${VNUM}/g" >> version.sed; \
	fi

protos:
	(cd src && ${MAKE} protos)

tidy:
	cvs commit -m ""
	(cd src && ${MAKE} tidy)
	(cd apps && ${MAKE} tidy)