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.1  2008/02/03 16:20:23  james
12 # *** empty log message ***
13 #
14 #
15 #
16 #
17 SUBDIRS=src apps test 
18
19 bin_SCRIPTS = libsympathy-config
20
21 libsympathy-config.src:libsympathy-config.src.in
22 libsympathy-config:libsympathy-config.src version.sed
23         @SED@ -f version.sed < libsympathy-config.src > libsympathy-config || rm -f libsympathy-config
24         chmod +x $@
25         
26
27 VFD=${srcdir}
28 VF=${shell cat ${VFD}/version-files}
29 VFS=${VF:%=${VFD}/%}
30 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
31 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
32 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
33
34 version.sed: $(VFD)/version-files $(VFD)/version-major \
35         $(VFD)/version-minor $(VFD)/version-micro \
36         $(VFD)/version-md5sums ${VFS} Makefile
37         if [ .${VNUM} = . ]; then \
38                 echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
39         else \
40                 echo "s/%VERSION%/${VNUM}/g" > version.sed; \
41         fi
42