-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.am
53 lines (43 loc) · 1.87 KB
/
Makefile.am
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
#
# Copyright (c) 2010 Citrix Systems, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
SUBDIRS=src
EXTRA_DIST= version-major version-minor version-micro version-files version-md5sums
bin_SCRIPTS = libxcdbus-config
pkgconfigdir=${libdir}/pkgconfig
pkgconfig_DATA= libxcdbus.pc
libxcdbus.pc.src:libxcdbus.pc.src.in
libxcdbus.pc:libxcdbus.pc.src
@SED@ -f version.sed < libxcdbus.pc.src > libxcdbus.pc || rm -f libxcdbus.pc
libxcdbus-config.src:libxcdbus-config.src.in
libxcdbus-config:libxcdbus-config.src version.sed
@SED@ -f version.sed < libxcdbus-config.src > libxcdbus-config || rm -f libxcdbus-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 }' }
VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
version.sed: $(VFD)/version-files $(VFD)/version-major \
$(VFD)/version-minor $(VFD)/version-micro \
$(VFD)/version-md5sums ${VFS} Makefile
if [ .${VNUM} = . ]; then \
echo "s/%VERSION%/${VDEF}-E/g" > version.sed; \
else \
echo "s/%VERSION%/${VNUM}/g" > version.sed; \
fi