summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-07-17 02:37:46 +0200
committertv <tv@krebsco.de>2016-07-17 02:37:46 +0200
commit0b84e3f161cee0ac20c6a85f18ad946ce980e0c2 (patch)
treef6e9fb69e7d5c3e2549ba4e0a8ef323f8da4bdac
parent10ff2cf70a11ae7a624d34c09bd04ff3f1b51983 (diff)
Makefile: define default target
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8279637cf..e6a8eeb95 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,8 @@ $(if $(target_user),,$(error unbound variable: target_user))
$(if $(target_port),,$(error unbound variable: target_port))
$(if $(target_path),,$(error unbound variable: target_path))
+export target ?= $(target_user)@$(target_host):$(target_port)$(target_path)
+
build = \
nix-build \
--no-out-link \
@@ -81,16 +83,14 @@ deploy: populate
# usage: make populate system=foo
ifeq ($(debug),true)
-populate: populate-flags = --debug
+populate: populate-flags += --debug
endif
ifneq ($(ssh),)
populate: populate-flags += --ssh=$(ssh)
endif
populate:
$(call evaluate,config.krebs.build.source) --json --strict | \
- populate \
- $(target_user)@$(target_host):$(target_port)$(target_path) \
- $(populate-flags)
+ populate $(target) $(populate-flags)
# usage: make pkgs.populate
pkgs:;@$(error no package selected)