96bbebb84d850f3663607ca9ad854eb6a7260628
[barometer.git] / src / collectd-openstack-plugins / Makefile
1 # makefile to manage COLLECTD_OPENSTACK package
2 #
3
4 # Copyright 2015-2017 OPNFV
5 #
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
9 #
10 #     http://www.apache.org/licenses/LICENSE-2.0
11 #
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.
17
18 #
19 # Contributors:
20 #   Aihua Li, Huawei Technologies.
21 #   Martin Klozik, Intel Corporation.
22
23 include ../mk/master.mk
24 include ../package-list.mk
25
26 .PHONY: force_make install
27
28 WORK_DIR = collectd-openstack-plugins
29 TAG_DONE_FLAG = $(WORK_DIR)/.$(COLLECTD_OPENSTACK_TAG).tag.done
30
31 all: force_make install
32         @echo "Finished making $(WORK_DIR) "
33
34 INSTALL_TARGET = force_make
35
36 force_make: $(WORK_DIR)
37         @echo "force make"
38         $(AT)cd $(WORK_DIR) && git checkout $(COLLECTD_OPENSTACK_TAG)
39         @echo "Make done"
40
41 install:
42         @echo "install done"
43
44 # hard way to clean and clobber
45 clean:
46         $(AT)cd $(WORK_DIR) && git clean -xfd *.o
47 clobber:
48         $(AT)rm -rf $(WORK_DIR)
49
50 # distclean is for developer who would like to keep the
51 # clone git repo, saving time to fetch again from url
52 distclean:
53         $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f
54
55 test:
56         @echo "Make test in $(WORK_DIR) (stub) "
57
58 sanity:
59         @echo "Make sanity in $(WORK_DIR) (stub) "
60
61 $(WORK_DIR):
62         $(AT)git clone $(COLLECTD_OPENSTACK_URL) $(WORK_DIR)
63