-
Notifications
You must be signed in to change notification settings - Fork 26
/
makefile
552 lines (471 loc) · 18 KB
/
makefile
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# Copyright 2014 The Serviced Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Turn off modules.
# Starting with Go 1.17, modules are required and this variable is ignored.
GO111MODULE = off
export GO111MODULE
VERSION := $(shell cat ./VERSION)
DATE := $(shell date -u '+%a_%b_%d_%H:%M:%S_%Z_%Y')
GO_VERSION := $(shell go version | awk '{print $$3}')
ifeq ($(OS),)
OS := $(shell uname -s)
endif
# Probably not necessary, but you never know
ifeq "$(OS)" "Windows_NT"
$(error Windows is not supported)
endif
GIT_COMMIT ?= $(shell ./gitstatus.sh)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GOBUILD_TAGS ?= $(shell bash build-tags.sh)
GOBUILD_FLAGS ?= -tags "$(GOBUILD_TAGS)"
GOVETTARGETS = $(shell GO111MODULE=off go list -f '{{.Dir}}' ./... | grep -v /vendor/ | grep -v '/serviced$$')
GOSOURCEFILES = $(shell find `GO111MODULE=off go list -f '{{.Dir}}' ./... | grep -v /vendor/` -maxdepth 1 -name \*.go)
# jenkins default, jenkins-${JOB_NAME}-${BUILD_NUMBER}
BUILD_TAG ?= 0
LDFLAGS = -ldflags " \
-X main.Version=$(VERSION) \
-X main.GoVersion=$(GO_VERSION) \
-X main.Gitcommit=$(GIT_COMMIT) \
-X main.Gitbranch=$(GIT_BRANCH) \
-X main.Buildtag=$(BUILD_TAG) \
-X main.Date=$(DATE)"
#---------------------#
# Macros #
#---------------------#
install_TARGETS = $(install_DIRS)
prefix = /opt/serviced
sysconfdir = /etc
#
# Specify if we want service definition templates (picked up from
# pkg/templates) to be included as part of the serviced packaging.
#
INSTALL_TEMPLATES ?= 1
#
# When packaging just the templates, throw this option.
#
INSTALL_TEMPLATES_ONLY = 0
# The installed footprint is influenced by the distro
# we're targeting. Allow this usage:
#
# sudo make install PKG=<deb|rpm>
#
PKG = $(default_PKG) # deb | rpm | tgz
default_PKG = deb
build_TARGETS = build_isvcs build_js $(GOBIN)/serviced $(GOBIN)/serviced-storage $(GOBIN)/serviced-controller $(GOBIN)/serviced-service
# Define GOPATH for containerized builds.
#
# NB: Keep this in sync with build/Dockerfile: ENV GOPATH /go
#
docker_GOPATH = /go
serviced_SRC = github.com/control-center/serviced
docker_serviced_SRC = $(docker_GOPATH)/src/$(serviced_SRC)
docker_serviced_pkg_SRC = $(docker_serviced_SRC)/pkg
docker_SRC = github.com/docker/docker
ifeq "$(GOPATH)" ""
$(warning "GOPATH not set. Ok to ignore for containerized builds.")
else
GOSRC = $(GOPATH)/src
GOBIN = $(GOPATH)/bin
GOPKG = $(GOPATH)/pkg
endif
# Avoid the inception problem of building from a container within a container.
IN_DOCKER = 0
GO = $(shell which go)
# Verify that we are running with the right go version
GOVERSION = $(shell $(GO) version)
COMPATIBLE_GO_VERSIONS = 1.7 1.8 1.9
GO_VERSION_PATTERN := $(foreach ver,$(COMPATIBLE_GO_VERSIONS),$(ver)%)
MIN_GO_VERSION = $(firstword $(COMPATIBLE_GO_VERSIONS))
GO_VERSION_TOO_FAR = 1.10
# Normalize DESTDIR so we can use this idiom in our install targets:
#
# $(_DESTDIR)$(prefix)
#
# and not end up with double slashes.
ifneq "$(DESTDIR)" ""
PREFIX_HAS_LEADING_SLASH = $(patsubst /%,/,$(prefix))
ifeq "$(PREFIX_HAS_LEADING_SLASH)" "/"
_DESTDIR := $(shell echo $(DESTDIR) | sed -e "s|\/$$||g")
else
_DESTDIR := $(shell echo $(DESTDIR) | sed -e "s|\/$$||g" -e "s|$$|\/|g")
endif
endif
#---------------------#
# Build targets #
#---------------------#
.PHONY: default build all
default build all: docker_build
.PHONY: artifacts
artifacts: $(build_TARGETS) govet
.PHONY: FORCE
FORCE:
.PHONY: goversion
goversion:
ifeq "$(filter $(GO_VERSION_PATTERN),$(patsubst go%,%,$(filter go1.%,$(GOVERSION))))" ""
$(error "Build requires go version >= $(MIN_GO_VERSION) and < $(GO_VERSION_TOO_FAR)")
endif
.PHONY: build_isvcs
build_isvcs:
cd isvcs && make
.PHONY: build_js
build_js:
ifeq "$(OS)" "Linux"
cd web/ui && make build
else
# The default JS build runs in a docker container. Launching docker containers and running a build with them on
# on OSX has been problematic, so skip it for developer builds running on OSX
@echo "\n\nWARNING: Skipping build_js on $(OS)\n\n"
endif
.PHONY: mockAgent
mockAgent:
cd acceptance/mockAgent && $(GO) build $(GOBUILD_FLAGS) ${LDFLAGS}
.PHONY: govet
govet:
@echo go vet -printf=false -composites=false DIRS...
@go vet -printf=false -composites=false $(GOVETTARGETS)
$(GOBIN):
@mkdir -p $@
$(GOBIN)/serviced: $(GOSOURCEFILES) | $(GOBIN)
$(GO) build $(GOBUILD_FLAGS) ${LDFLAGS} -o $@ .
$(GOBIN)/serviced-controller: $(GOSOURCEFILES) | $(GOBIN)
$(GO) build $(GOBUILD_FLAGS) ${LDFLAGS} -o $@ ./serviced-controller
$(GOBIN)/serviced-storage: $(GOSOURCEFILES) | $(GOBIN)
$(GO) build $(GOBUILD_FLAGS) ${LDFLAGS} -o $@ ./tools/serviced-storage
$(GOBIN)/serviced-service: $(GOSOURCEFILES) | $(GOBIN)
$(GO) build $(GOBUILD_FLAGS) ${LDFLAGS} -o $@ ./tools/serviced-service
.PHONY: serviced
serviced: $(GOBIN)/serviced
.PHONY: serviced-controller
serviced-controller: $(GOBIN)/serviced-controller
.PHONY: serviced-storage
serviced-storage: $(GOBIN)/serviced-storage
.PHONY: serviced-service
serviced-service: $(GOBIN)/serviced-service
.PHONY: go
go: $(GOBIN)/serviced $(GOBIN)/serviced-controller $(GOBIN)/serviced-storage $(GOBIN)/serviced-service
#
# BUILD_VERSION is the version of the serviced-build docker image
# If the build image version changes, then zenoss-deploy needs to be updated
#
BUILD_VERSION = v1.8.0-0
export BUILD_VERSION
#
# This target is used to rebuild the zenoss/serviced-build image.
# It is intended to be run manually whenever the contents of the build image change.
# It should not be run as part for the regular local build process, or the
# regular Jenkins build process.
#
buildServicedBuildImage: docker_ok buildServicedBuildImage_ok
cp web/ui/package.json build
cp web/ui/yarn.lock build
docker build -t zenoss/serviced-build:$(BUILD_VERSION) build
#
# This target is used to push the zenoss/serviced-build image to docker hub.
# It is intended to be run manually whenever the contents of the build image change.
# It should not be run as part for the regular local build process, or the
# regular Jenkins build process.
#
pushServicedBuildImage: docker_ok
docker push zenoss/serviced-build:$(BUILD_VERSION)
buildServicedBuildImage_ok:
ifndef forceDockerBuild
@echo "Checking to see if zenoss/serviced-build:$(BUILD_VERSION) exists"
@if docker images | grep zenoss/serviced-build | grep $(BUILD_VERSION) >/dev/null; then \
echo "ERROR: zenoss/serviced-build:$(BUILD_VERSION) already exists"; \
echo " To replace it, use"; \
echo " make forceDockerBuild=true buildServicedBuildImage"; \
exit 1; \
else \
echo "Verified zenoss/serviced-build:$(BUILD_VERSION) does NOT exist"; \
fi
else
@echo "Skipping check to see if zenoss/serviced-build:$(BUILD_VERSION) exists"
@echo "Replacing zenoss/serviced-build:$(BUILD_VERSION) (if it already exists)";
endif
.PHONY: docker_build
pkg_build_tmp = pkg/build/tmp
docker_build: docker_ok
docker run --rm \
-v $(GOPATH)/bin:$(docker_GOPATH)/bin \
-v $(CURDIR):$(docker_serviced_SRC) \
-w $(docker_serviced_pkg_SRC) \
-e "GOPATH=$(docker_GOPATH)" \
zenoss/serviced-build:$(BUILD_VERSION) \
make clean
if [ ! -d "$(pkg_build_tmp)" ]; then mkdir -p $(pkg_build_tmp); fi
docker run --rm -t \
-v $(GOPATH)/bin:$(docker_GOPATH)/bin \
-v $(CURDIR):$(docker_serviced_SRC) \
-v $(CURDIR)/$(pkg_build_tmp):/tmp \
-w $(docker_serviced_SRC) \
-e "GOPATH=$(docker_GOPATH)" \
-e "NODEJS=/usr/bin/node" \
-e "IN_DOCKER=1" \
zenoss/serviced-build:$(BUILD_VERSION) \
make artifacts
#---------------------#
# Install targets #
#---------------------#
install_DIRS = $(_DESTDIR)$(prefix)
install_DIRS += $(_DESTDIR)/usr/bin
install_DIRS += $(_DESTDIR)$(prefix)/bin
install_DIRS += $(_DESTDIR)$(prefix)/etc
install_DIRS += $(_DESTDIR)$(prefix)/doc
install_DIRS += $(_DESTDIR)$(prefix)/share/web
install_DIRS += $(_DESTDIR)$(prefix)/share/shell
install_DIRS += $(_DESTDIR)$(prefix)/isvcs
install_DIRS += $(_DESTDIR)$(sysconfdir)/default
install_DIRS += $(_DESTDIR)$(sysconfdir)/bash_completion.d
install_DIRS += $(_DESTDIR)$(sysconfdir)/cron.d
install_DIRS += $(_DESTDIR)$(sysconfdir)/cron.hourly
install_DIRS += $(_DESTDIR)$(sysconfdir)/cron.weekly
# Specify the stuff to install as attributes of the various
# install directories we know about.
#
# Usage:
#
# $(dir)_TARGETS = filename
# $(dir)_TARGETS = src_filename:dest_filename
#
default_INSTCMD = cp
$(_DESTDIR)$(sysconfdir)/cron.d_TARGETS = pkg/cron_zenossdbpack:cron_zenossdbpack
$(_DESTDIR)$(sysconfdir)/cron.hourly_TARGETS = pkg/cron.hourly:serviced
$(_DESTDIR)$(sysconfdir)/cron.weekly_TARGETS = pkg/serviced-fstrim:serviced-fstrim
$(_DESTDIR)$(prefix)/etc_TARGETS = pkg/serviced.logrotate:logrotate.conf
$(_DESTDIR)$(prefix)/etc_TARGETS += pkg/logconfig-cli.yaml:logconfig-cli.yaml
$(_DESTDIR)$(prefix)/etc_TARGETS += pkg/logconfig-controller.yaml:logconfig-controller.yaml
$(_DESTDIR)$(prefix)/etc_TARGETS += pkg/logconfig-server.yaml:logconfig-server.yaml
$(_DESTDIR)$(prefix)/etc_TARGETS += pkg/elastic-migration/es_cluster.ini:es_cluster.ini
$(_DESTDIR)$(prefix)/bin_TARGETS = $(GOBIN)/serviced:serviced
$(_DESTDIR)$(prefix)/bin_TARGETS += $(GOBIN)/serviced-controller:serviced-controller
$(_DESTDIR)$(prefix)/bin_TARGETS += $(GOBIN)/serviced-storage:serviced-storage
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-zenossdbpack:serviced-zenossdbpack
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-container-cleanup:serviced-container-cleanup
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-container-usage:serviced-container-usage
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-set-version:serviced-set-version
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-fstrim:serviced-fstrim
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/elastic-migration/elastic:elastic
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/elastic-migration/migrate_es_logstash_data.sh:migrate_es_logstash_data.sh
$(_DESTDIR)$(prefix)/bin_LINK_TARGETS += $(prefix)/bin/serviced:$(_DESTDIR)/usr/bin/serviced
$(_DESTDIR)$(prefix)/bin_LINK_TARGETS += $(prefix)/bin/serviced-storage:$(_DESTDIR)/usr/bin/serviced-storage
$(_DESTDIR)$(prefix)/share/web_TARGETS = web/ui/build:static
$(_DESTDIR)$(prefix)/share/web_INSTOPT = -R
$(_DESTDIR)$(prefix)/share/shell_TARGETS = shell/static:.
$(_DESTDIR)$(prefix)/share/shell_INSTOPT = -R
$(_DESTDIR)$(prefix)/isvcs_TARGETS = isvcs/resources:.
$(_DESTDIR)$(prefix)/isvcs_INSTOPT = -R
$(_DESTDIR)$(sysconfdir)/default_TARGETS = pkg/serviced.default:serviced
$(_DESTDIR)$(sysconfdir)/bash_completion.d_TARGETS = serviced-bash-completion.sh:serviced
#-----------------------------------#
# Install targets #
#-----------------------------------#
install_DIRS += $(_DESTDIR)/usr/lib/systemd/system
$(_DESTDIR)/usr/lib/systemd/system_TARGETS = pkg/serviced.service:serviced.service
$(_DESTDIR)$(prefix)/bin_TARGETS += pkg/serviced-systemd.sh:serviced-systemd.sh
#-----------------------------------#
# Install targets (service defs) #
#-----------------------------------#
# We're moving toward packaging service definitions by themselves.
# Define the policies that control when templates show up under the
# staged install directory (i.e., $(PKGROOT)/opt/serviced/templates)
# consumed at package time.
#
# TODO: Revisit where to tuck these templates relative to FHS.
# NB: If either INSTALL_TEMPLATES or INSTALL_TEMPLATES_ONLY is asserted
# then jump into the body of the ifneq and augment install_DIRS and
# targets accordingly.
ifneq (,$(filter 1,$(INSTALL_TEMPLATES) $(INSTALL_TEMPLATES_ONLY)))
ifeq "$(INSTALL_TEMPLATES_ONLY)" "1"
# Install just the service definitions in preparation
# for creating servicedef packages.
install_DIRS = $(_DESTDIR)$(prefix)/templates
else
# Include svcdefs with serviced deb.
install_DIRS += $(_DESTDIR)$(prefix)/templates
endif
# At the moment, the pkg/templates directory is actually
# populated by our top-level makefile. This seems a bit disjoint.
# Will fix once I figure out some cleaner.
$(_DESTDIR)$(prefix)/templates_TARGETS = pkg/templates/:.
$(_DESTDIR)$(prefix)/templates_INSTCMD = rsync
$(_DESTDIR)$(prefix)/templates_INSTOPT = -a --exclude=README.txt
endif
# Iterate across all the install dirs, populating
# same with install targets (e.g., files, directories).
#
$(install_DIRS): install_TARGETS = $($@_TARGETS)
$(install_DIRS): install_LINK_TARGETS = $($@_LINK_TARGETS)
$(install_DIRS): instcmd = $(firstword $($@_INSTCMD) $(default_INSTCMD))
$(install_DIRS): instopt = $($@_INSTOPT)
$(install_DIRS): FORCE
@for install_DIR in $@ ;\
do \
if [ ! -d "$${install_DIR}" ];then \
echo "mkdir -p $${install_DIR}" ;\
mkdir -p $${install_DIR};\
rc=$$? ;\
if [ $${rc} -ne 0 ];then \
echo "[$@] Try: 'sudo make install' or 'make install DESTDIR=/tmp/root'" ;\
exit $${rc} ;\
fi ;\
fi ;\
for install_TARGET in $(install_TARGETS) ;\
do \
case $${install_TARGET} in \
*:*) \
from=`echo $${install_TARGET} | cut -d: -f1`;\
to=`echo $${install_TARGET} | cut -d: -f2` ;\
;;\
*) \
from=$${install_TARGET} ;\
to=$${install_TARGET} ;\
;;\
esac ;\
if [ -e "$${from}" ];then \
echo "$(instcmd) $(instopt) $${from} $${install_DIR}/$${to}" ;\
$(instcmd) $(instopt) $${from} $${install_DIR}/$${to} ;\
rc=$$? ;\
if [ $${rc} -ne 0 ];then \
exit $${rc} ;\
fi ;\
else \
echo "[$@] Missing $${from}" ;\
echo "[$@] Try: 'make build'" ;\
exit 1 ;\
fi ;\
done ;\
for install_LINK_TARGET in $(install_LINK_TARGETS) ;\
do \
case $${install_LINK_TARGET} in \
*:*) \
from=`echo $${install_LINK_TARGET} | cut -d: -f1`;\
to=`echo $${install_LINK_TARGET} | cut -d: -f2` ;\
;;\
*) \
from=$${install_LINK_TARGET} ;\
to= ;\
;;\
esac ;\
if [ -e "$(_DESTDIR)$${from}" ];then \
echo "ln -sf $${from} $${to}" ;\
ln -sf $${from} $${to} ;\
rc=$$? ;\
if [ $${rc} -ne 0 ];then \
exit $${rc} ;\
fi ;\
else \
echo "[$@] Missing $(_DESTDIR)$${from}" ;\
echo "[$@] Try: 'make build && make install'" ;\
exit 1 ;\
fi ;\
done ;\
done ;
.PHONY: install
install: $(install_TARGETS)
#---------------------#
# Packaging targets #
#---------------------#
PKGS = deb rpm tgz
.PHONY: pkgs
pkgs:
cd pkg && $(MAKE) IN_DOCKER=$(IN_DOCKER) INSTALL_TEMPLATES=$(INSTALL_TEMPLATES) $(PKGS)
# Both BUILD_NUMBER and RELEASE_PHASE cannot be empty.
# If not providing a BUILD_NUMBER, then it is assumed that this is not a nightly build,
# and a RELEASE_PHASE must be provided (ALPHA1, BETA1, RC1, etc)
.PHONY: docker_buildandpackage
docker_buildandpackage: docker_ok
if [ -z "$$RELEASE_PHASE" -a -z "$$BUILD_NUMBER" ]; then exit 1; fi
docker run --rm \
-v $(CURDIR):/go/src/github.com/control-center/serviced \
-w $(docker_serviced_pkg_SRC) \
-e "GOPATH=$(docker_GOPATH)" \
zenoss/serviced-build:$(BUILD_VERSION) \
make clean
if [ ! -d "$(pkg_build_tmp)" ]; then mkdir -p $(pkg_build_tmp); fi
docker run --rm -t \
-v $(CURDIR):$(docker_serviced_SRC) \
-v $(CURDIR)/$(pkg_build_tmp):/tmp \
-w $(docker_serviced_SRC) \
-e "NODEJS=/usr/bin/node" \
-e "IN_DOCKER=1" \
-e "INSTALL_TEMPLATES=$(INSTALL_TEMPLATES)" \
-e "GOPATH=$(docker_GOPATH)" \
-e "BUILD_TAG=$(BUILD_TAG)" \
-e "BUILD_NUMBER=$(BUILD_NUMBER)" \
-e "RELEASE_PHASE=$(RELEASE_PHASE)" \
-e "SUBPRODUCT=$(SUBPRODUCT)" \
zenoss/serviced-build:$(BUILD_VERSION) \
make artifacts pkgs
#---------------------#
# Test targets #
#---------------------#
.PHONY: test
test: unit_test integration_test integration_docker_test integration_dao_test integration_zzk_test js_test
unit_test: build docker_ok
./serviced-tests.py --unit --race
integration_test: build docker_ok
./serviced-tests.py --integration --quick --race
integration_docker_test: build docker_ok
./serviced-tests.py --integration --race --packages ./commons/docker/...
integration_dao_test: build docker_ok
./serviced-tests.py --integration --elastic --race --packages ./dao/elasticsearch/...
integration_zzk_test: build docker_ok
./serviced-tests.py --integration --race --packages ./zzk/...
js_test: build docker_ok
cd web/ui && make "GO=$(GO)" test
smoketest: build docker_ok
/bin/bash smoke.sh
docker_ok:
@if docker ps >/dev/null; then \
echo "docker OK"; \
else \
echo "Check 'docker ps' command"; \
exit 1;\
fi
#---------------------#
# Clean targets #
#---------------------#
.PHONY: clean_js
clean_js:
cd web/ui && make clean
.PHONY: clean_serviced
clean_serviced:
@for target in serviced $(serviced) ;\
do \
if [ -f "$${target}" ];then \
rm -f $${target} ;\
echo "rm -f $${target}" ;\
fi ;\
done
-$(GO) clean
rm -rf $(GOBIN)/serviced
rm -rf $(GOBIN)/serviced-storage
rm -rf $(GOBIN)/serviced-controller
rm -rf $(GOBIN)/serviced-service
.PHONY: clean_pkg
clean_pkg:
cd pkg && make clean
.PHONY: clean
clean: clean_js clean_pkg clean_serviced
.PHONY: docker_clean_pkg
docker_clean_pkg:
docker run --rm \
-v $(CURDIR):$(docker_serviced_SRC) \
-w $(docker_serviced_pkg_SRC) \
-e "GOPATH=$(docker_GOPATH)" \
zenoss/serviced-build:$(BUILD_VERSION) \
make clean
.PHONY: docker_clean
docker_clean: docker_clean_pkg
.PHONY: mrclean
mrclean: docker_clean clean