blob: 48c46ec880f8a109444099d3c990fbf465572440 (
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
|
#
# Copyright (c) 2013-2014 Red Hat.
# Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program 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 General Public License
# for more details.
#
TOPDIR = ../..
include $(TOPDIR)/src/include/builddefs
SUBDIRS = src examples
OTHERS = control stomp rc_pmie pmie2col.sh pmie_check.sh pmie_daily.sh
LSRCFILES = $(OTHERS) crontab.in
LDIRT = crontab pmie.service
ifeq ($(TARGET_OS),linux)
CRONTAB_USER = $(PCP_USER)
CRONTAB_PATH = $(PCP_ETC_DIR)/cron.d/pcp-pmie
else
CRONTAB_USER =
CRONTAB_PATH = $(PCP_SYSCONF_DIR)/pmie/crontab
endif
default:: crontab pmie.service
default:: $(SUBDIRS)
$(SUBDIRS_MAKERULE)
install:: $(SUBDIRS)
$(SUBDIRS_MAKERULE)
install:: default
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_SYSCONF_DIR)/pmie
$(INSTALL) -m 664 -o $(PCP_USER) -g $(PCP_GROUP) control $(PCP_PMIECONTROL_PATH)
$(INSTALL) -m 755 pmie_check.sh $(PCP_BINADM_DIR)/pmie_check$(SHELLSUFFIX)
$(INSTALL) -m 755 pmie_daily.sh $(PCP_BINADM_DIR)/pmie_daily$(SHELLSUFFIX)
$(INSTALL) -m 755 pmie2col.sh $(PCP_BIN_DIR)/pmie2col$(SHELLSUFFIX)
$(INSTALL) -m 755 rc_pmie $(PCP_RC_DIR)/pmie
ifeq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 pmie.service $(PCP_SYSTEMDUNIT_DIR)/pmie.service
endif
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_LOG_DIR)/pmie
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmie
ifeq ($(TARGET_OS),linux)
$(INSTALL) -m 755 -d `dirname $(CRONTAB_PATH)`
endif
$(INSTALL) -m 644 crontab $(CRONTAB_PATH)
include $(BUILDRULES)
default_pcp : default
install_pcp : install
pmie.service : pmie.service.in
$(SED) -e 's;@path@;'$(PCP_RC_DIR)';' $< > $@
crontab: crontab.in
$(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';g' $< > $@
|