File: makefile.lxc

package info (click to toggle)
searx 1.1.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,644 kB
  • sloc: python: 16,545; sh: 3,842; javascript: 2,104; xml: 1,071; makefile: 118
file content (32 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (2)
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
# -*- coding: utf-8; mode: makefile-gmake -*-
#
# LXC environment
# ===============
#
# To activate/deactivate LXC makefile environment in a container, set/unset link
# from root '/.lxcenv.mk' to *this* file::
#
#   sudo make ./utils/makefile.lxc lxc-activate
#   sudo make ./utils/makefile.lxc lxc-deactivate

LXC_ENV_FOLDER=lxc-env/$(shell hostname)/

lxc-help::
	@echo  '  LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)'

# If not activated, serve target 'lxc-activate' ..
ifeq (,$(wildcard /.lxcenv.mk))
PHONY += lxc-activate
lxc-activate:
	ln -s "$(abspath $(lastword $(MAKEFILE_LIST)))" "/.lxcenv.mk"
else
# .. and if activated, serve target 'lxc-deactivate'.
PHONY += lxc-deactivate
lxc-deactivate:
	rm /.lxcenv.mk
$(LXC_ENV_FOLDER):
	$(Q)mkdir -p $(LXC_ENV_FOLDER)
	$(Q)echo placeholder > $(LXC_ENV_FOLDER).placeholder
endif

.PHONY: $(PHONY)