forked from ParaStation/pscom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.am
55 lines (44 loc) · 1.49 KB
/
common.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
53
54
55
#
# ParaStation
#
# Copyright (C) 2012 ParTec Cluster Competence Center GmbH, Munich
#
# This file may be distributed under the terms of the Q Public License
# as defined in the file LICENSE.QPL included in the packaging of this
# file.
#
# Author: Thomas Moschny <[email protected]>
#
AM_CPPFLAGS = -I$(top_srcdir)/include
VC_VERSION = $(shell ${top_srcdir}/scripts/vcversion -r $(top_srcdir) -n)
sed_verbose = $(sed_verbose_$(V))
sed_verbose_ = $(sed_verbose_$(AM_DEFAULT_VERBOSITY))
sed_verbose_0 = @echo " SED " $(@F);
chmod_verbose = $(chmod_verbose_$(V))
chmod_verbose_ = $(chmod_verbose_$(AM_DEFAULT_VERBOSITY))
chmod_verbose_0 = @echo " CHMOD " $(@F);
txt2man_verbose = $(txt2man_verbose_$(V))
txt2man_verbose_ = $(txt2man_verbose_$(AM_DEFAULT_VERBOSITY))
txt2man_verbose_0 = @echo "TXT2MAN " $(@F);
do_subst = sed \
-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
-e 's,[@]bindir[@],$(bindir),g' \
-e 's,[@]libdir[@],$(libdir),g' \
-e 's,[@]includedir[@],$(includedir),g' \
-e 's,[@]configdir[@],$(configdir),g' \
-e 's,[@]docdir[@],$(docdir),g'
%: %.sh
$(sed_verbose)$(do_subst) < $^ > $@
$(chmod_verbose)chmod +x $@
%: %.in
$(sed_verbose)$(do_subst) < $^ > $@
TXT2MAN = $(top_srcdir)/scripts/txt2man
%.1 %.2 %.3 %.4 %.5 .%6 %.7 %.8: %.txt
$(txt2man_verbose)$(TXT2MAN) \
-s $(subst $*.,,$@) \
-t "$*" \
-r "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-v "ParaStation" $(TXT2MAN_KEYWORDS) \
$< > $@
# FIXME: non-standard
configdir = $(prefix)/config