diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-18 16:46:35 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-18 16:46:35 -0200 |
commit | ebdcbb94f235a2b0687d8497498074a20886d318 (patch) | |
tree | 786f886dea4053a9a90fd74b3a39faed950fa9af /share/templater/templater | |
parent | 657ed42c4a71d5b050a2f36a4dee0b13ffc7d6b4 (diff) | |
download | templater-ebdcbb94f235a2b0687d8497498074a20886d318.tar.gz templater-ebdcbb94f235a2b0687d8497498074a20886d318.tar.bz2 |
Makefile: detect CONTAINER
Diffstat (limited to 'share/templater/templater')
-rw-r--r-- | share/templater/templater/files/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/share/templater/templater/files/Makefile b/share/templater/templater/files/Makefile index 6527452..b6890f7 100644 --- a/share/templater/templater/files/Makefile +++ b/share/templater/templater/files/Makefile @@ -5,6 +5,18 @@ # any Makefile.* available in the current folder. # +# Set CONTAINER based in what we have available in the system +# This variable can be user in other, included Makefiles to handle virtualization tasks +ifeq ($(shell which kvmx > /dev/null && test -s kvmxfile && echo yes), yes) + CONTAINER = kvmx +else ifeq ($(shell which vagrant > /dev/null && test -s Vagrantfile && echo yes), yes) + CONTAINER = vagrant +else ifeq ($(shell which docker > /dev/null && test -s Dockerfile && echo yes), yes) + CONTAINER = docker +else + CONTAINER = '' +endif + # See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200 # http://php.net/manual/en/features.commandline.webserver.php serve: @@ -13,10 +25,19 @@ serve: #python3 -m http.server #php -S localhost:8000 +# Configure a git post-receive hook post_receive: git config receive.denyCurrentBranch ignore test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive # Process any other Makefile whose filename matches Makefile.* # See https://www.gnu.org/software/make/manual/html_node/Include.html +# +# Some of those files might even contain local customizations/overrides +# that can be .gitignore'd, like a Makefile.local for example. -include Makefile.* + +# Customization examples can be as simple as setting variables: +#CONTAINER = vagrant +#CONTAINER = docker +#DESTDIR ?= vendor |