Created
May 13, 2013 09:40
-
-
Save norrs/5567208 to your computer and use it in GitHub Desktop.
Why do I get missing seperator? Trying to add the include Makefile.local if it exists in same directory as Makefile.
Tabs and spaces is correct I think? make ptv_themes
Makefile:21: *** missing separator. Stop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PY=python | |
PELICAN=pelican | |
PELICANOPTS= | |
BASEDIR=$(CURDIR) | |
INPUTDIR=$(BASEDIR)/content | |
PTVDIR=$(BASEDIR)/ptv | |
OUTPUTDIR=$(BASEDIR)/output | |
CONFFILE=$(BASEDIR)/pelicanconf.py | |
PUBLISHCONF=$(BASEDIR)/publishconf.py | |
FTP_HOST=localhost | |
FTP_USER=anonymous | |
FTP_TARGET_DIR=/ | |
SSH_HOST= | |
SSH_PORT= | |
SSH_USER= | |
SSH_TARGET_DIR= | |
.if exists(${.CURDIR}/Makefile.local) | |
.include "${.CURDIR}/Makefile.local" | |
.endif | |
S3_BUCKET=my_s3_bucket | |
DROPBOX_DIR=~/Dropbox/Public/ | |
help: | |
@echo 'Makefile for a pelican Web site ' | |
@echo ' ' | |
@echo 'Usage: ' | |
@echo ' make html (re)generate the web site ' | |
@echo ' make clean remove the generated files ' | |
@echo ' make regenerate regenerate files upon modification ' | |
@echo ' make publish generate using production settings ' | |
@echo ' make serve serve site at http://localhost:8000' | |
@echo ' make devserver start/restart develop_server.sh ' | |
@echo ' make stopserver stop local server ' | |
@echo ' ssh_upload upload the web site via SSH ' | |
@echo ' rsync_upload upload the web site via rsync+ssh ' | |
@echo ' dropbox_upload upload the web site via Dropbox ' | |
@echo ' ftp_upload upload the web site via FTP ' | |
@echo ' s3_upload upload the web site via S3 ' | |
@echo ' github upload the web site via gh-pages ' | |
@echo ' ' | |
html: clean $(OUTPUTDIR)/index.html | |
$(OUTPUTDIR)/%.html: ptv | |
clean: | |
[ ! -d $(OUTPUTDIR) ] || find $(OUTPUTDIR) -mindepth 1 -delete | |
regenerate: clean ptv | |
serve: | |
cd $(OUTPUTDIR) && $(PY) -m pelican.server | |
devserver: | |
$(BASEDIR)/develop_server.sh restart | |
stopserver: | |
kill -9 `cat pelican.pid` | |
kill -9 `cat srv.pid` | |
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' | |
ptv: | |
rsync -P -rvz --delete $(PTVDIR)/* $(OUTPUTDIR)/ --cvs-exclude | |
ptv_dev: clean | |
for ptv_dev_file in $(BASEDIR)/ptv/*; do ln -s "$$ptv_dev_file" "$(OUTPUTDIR)/"; done | |
ptv_themes: | |
[ -f $(OUTPUTDIR)/js/themes.txt ] && rm $(OUTPUTDIR)/js/themes.txt || echo "NO themes file found, creating it" | |
touch $(OUTPUTDIR)/js/themes.txt | |
for theme in pelican-themes/* ; do \ | |
if [ -d "$(BASEDIR)/$$theme" ]; then \ | |
$(PELICAN) $(INPUTDIR) -t "$(BASEDIR)/$$theme" -o $(OUTPUTDIR)/$$theme; \ | |
basename "$$theme" >> $(OUTPUTDIR)/js/themes.txt; \ | |
fi \ | |
done | |
publish: ptv ptv_themes | |
ssh_upload: publish | |
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) | |
rsync_upload: publish | |
rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude | |
dropbox_upload: publish | |
cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) | |
ftp_upload: publish | |
lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" | |
s3_upload: publish | |
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed | |
github: publish | |
ghp-import $(OUTPUTDIR) | |
git push origin gh-pages | |
.PHONY: html help clean regenerate serve devserver ptv ptv_themes ptv_dev publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload github |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment