1 # makefile to manage collectd package
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 # Aihua Li, Huawei Technologies.
21 # Maryam Tahhan, Intel Corporation.
23 include ../mk/master.mk
24 include ../package-list.mk
27 TAG_DONE_FLAG = $(WORK_DIR)/.$(PMUTOOLS_TAG).done
31 .PHONY: install force_install force_make
33 # install depends on make
34 force_install: force_make
37 @echo "Finished making $(WORK_DIR) "
39 INSTALL_TARGET = force_install force_make
41 force_make: $(WORK_DIR) $(TAG_DONE_FLAG)
42 $(AT)cd $(WORK_DIR) && git pull $(PMUTOOLS_URL) $(PMUTOOLS_TAG)
44 $(AT)cd $(WORK_DIR)/jevents
45 $(AT)sed -i 's/CFLAGS += -g -Wall -O2 -Wno-unused-result -fPIC/CFLAGS += -g -Wall -O2 -Wno-unused-result -fPIC/' $(MAKEFILE)
46 $(AT)$(MAKE) -C $(WORK_DIR)/jevents
50 $(AT)sudo $(MAKE) -C $(WORK_DIR)/jevents install
51 $(AT)./$(WORK_DIR)/event_download.py
53 install: $(INSTALL_TARGET)
55 # hard way to clean and clobber
57 $(AT)cd $(WORK_DIR) && git clean -xfd *.o
60 $(AT)rm -rf $(WORK_DIR)
62 # distclean is for developer who would like to keep the
63 # clone git repo, saving time to fetch again from url
65 $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f
68 @echo "Make test in $(WORK_DIR) (stub) "
71 @echo "Make sanity in $(WORK_DIR) (stub) "
74 $(AT)git clone $(PMUTOOLS_URL)
76 $(TAG_DONE_FLAG): $(WORK_DIR)
77 $(AT)cd $(WORK_DIR); git checkout $(PMUTOOLS_TAG)
78 ifneq ($(PATCH_FILE),)
79 $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE)