From: W. Trevor King Date: Fri, 28 Feb 2014 02:08:09 +0000 (-0800) Subject: x.509/Makefile-{link,server}: Allow users to override FQDNS X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=610bd202af6c82dc51391943fdb9c2634e6a56dc;p=dockerfile.git x.509/Makefile-{link,server}: Allow users to override FQDNS By using ?= to assign that variable only if it's not already set [1]. For Makefile-link, also append the 'nginx' entry using += [2], to ensure it is always present. [1]: https://www.gnu.org/software/make/manual/html_node/Setting.html [2]: https://www.gnu.org/software/make/manual/html_node/Appending.html --- diff --git a/x.509/Makefile-link b/x.509/Makefile-link index c73b4b7..7fe799a 100644 --- a/x.509/Makefile-link +++ b/x.509/Makefile-link @@ -9,11 +9,12 @@ DOMAIN ?= example.com HOSTS ?= www static media kibana es +FQDNS ?= $(patsubst %, %.$(DOMAIN), $(HOSTS)) +FQDNS += nginx WILDCARD_KEY ?= /etc/ssl/$(DOMAIN)/wildcard.$(DOMAIN).key WILDCARD_CERT_CHAIN ?= /etc/ssl/$(DOMAIN)/wildcard.$(DOMAIN)-chain.crt -FQDNS = $(patsubst %, %.$(DOMAIN), $(HOSTS)) nginx KEYS = $(patsubst %, %.key, $(FQDNS)) CERTS = $(patsubst %, %.pem, $(FQDNS)) diff --git a/x.509/Makefile-server b/x.509/Makefile-server index 247a55c..a43474d 100644 --- a/x.509/Makefile-server +++ b/x.509/Makefile-server @@ -12,11 +12,11 @@ ORGANIZATION ?= Example, Inc. DOMAIN ?= example.com HOSTS ?= www static media kibana es DEFAULT ?= www.$(DOMAIN) +FQDNS ?= $(patsubst %, %.$(DOMAIN), $(HOSTS)) CA_KEY ?= /etc/ssl/ca/key.pem CA_CERT ?= /etc/ssl/ca/ca.pem -FQDNS = $(patsubst %, %.$(DOMAIN), $(HOSTS)) KEYS = $(patsubst %, %.key, $(FQDNS)) CERTS = $(patsubst %, %.cert, $(FQDNS)) CHAINED_CERTS = $(patsubst %, %.pem, $(FQDNS))