forked from github/pelican
Handle case of missing port in target "serve-global"
Also factor out the check for the SERVER variable to avoid nested ifdefs. Fixes #2696
This commit is contained in:
parent
f2dbfbfcec
commit
ab5e78db2a
1 changed files with 9 additions and 6 deletions
|
|
@ -50,6 +50,14 @@ ifeq ($(RELATIVE), 1)
|
|||
PELICANOPTS += --relative-urls
|
||||
endif
|
||||
|
||||
SERVER ?= "0.0.0.0"
|
||||
|
||||
PORT ?= 0
|
||||
ifneq ($(PORT), 0)
|
||||
PELICANOPTS += -p $(PORT)
|
||||
endif
|
||||
|
||||
|
||||
help:
|
||||
@echo 'Makefile for a pelican Web site '
|
||||
@echo ' '
|
||||
|
|
@ -100,12 +108,7 @@ else
|
|||
endif
|
||||
|
||||
serve-global:
|
||||
ifdef SERVER
|
||||
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
|
||||
else
|
||||
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
|
||||
endif
|
||||
|
||||
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -b $(SERVER)
|
||||
|
||||
devserver:
|
||||
ifdef PORT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue