|
@@ -9,24 +9,11 @@ OUTPUTDIR=$(BASEDIR)/output
|
|
|
CONFFILE=$(BASEDIR)/pelicanconf.py
|
|
|
PUBLISHCONF=$(BASEDIR)/publishconf.py
|
|
|
|
|
|
-FTP_HOST=localhost
|
|
|
-FTP_USER=anonymous
|
|
|
-FTP_TARGET_DIR=/
|
|
|
-
|
|
|
SSH_HOST=fangmeier.tech
|
|
|
SSH_PORT=22
|
|
|
SSH_USER=caleb
|
|
|
SSH_TARGET_DIR=/var/www/thesis
|
|
|
|
|
|
-S3_BUCKET=my_s3_bucket
|
|
|
-
|
|
|
-CLOUDFILES_USERNAME=my_rackspace_username
|
|
|
-CLOUDFILES_API_KEY=my_rackspace_api_key
|
|
|
-CLOUDFILES_CONTAINER=my_cloudfiles_container
|
|
|
-
|
|
|
-DROPBOX_DIR=~/Dropbox/Public/
|
|
|
-
|
|
|
-GITHUB_PAGES_BRANCH=gh-pages
|
|
|
|
|
|
DEBUG ?= 0
|
|
|
ifeq ($(DEBUG), 1)
|
|
@@ -45,39 +32,47 @@ help:
|
|
|
@echo ' make html (re)generate the web site '
|
|
|
@echo ' make pdf (re)generate the pdf '
|
|
|
@echo ' make clean remove the generated files '
|
|
|
- @echo ' make regenerate regenerate files upon modification '
|
|
|
@echo ' make publish generate using production settings '
|
|
|
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
|
|
|
- @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
|
|
|
- @echo ' make devserver [PORT=8000] start/restart develop_server.sh '
|
|
|
- @echo ' make stopserver stop local server '
|
|
|
- @echo ' make ssh_upload upload the web site via SSH '
|
|
|
@echo ' make rsync_upload upload the web site via rsync+ssh '
|
|
|
- @echo ' make dropbox_upload upload the web site via Dropbox '
|
|
|
- @echo ' make ftp_upload upload the web site via FTP '
|
|
|
- @echo ' make s3_upload upload the web site via S3 '
|
|
|
- @echo ' make cf_upload upload the web site via Cloud Files'
|
|
|
- @echo ' make github upload the web site via gh-pages '
|
|
|
@echo ' '
|
|
|
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
|
|
|
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
|
|
|
@echo ' '
|
|
|
|
|
|
-html:
|
|
|
- ./convert.py html
|
|
|
+build/%.html: content/%.md
|
|
|
+ @./convert.py $*.md html
|
|
|
+
|
|
|
+build/%.tex: content/%.md
|
|
|
+ @./convert.py $*.md tex
|
|
|
+
|
|
|
+00_html: build/00_abstract.html
|
|
|
+01_html: build/01_introduction.html
|
|
|
+02_html: build/02_standard_model.html
|
|
|
+03_html: build/03_lhc_and_cms_detector.html
|
|
|
+04_html: build/04_simulation_and_reconstruction.html
|
|
|
+05_html: build/05_tttt_measurement.html
|
|
|
+06_html: build/06_pixel_assembly.html
|
|
|
+
|
|
|
+00_tex: build/00_abstract.tex
|
|
|
+01_tex: build/01_introduction.tex
|
|
|
+02_tex: build/02_standard_model.tex
|
|
|
+03_tex: build/03_lhc_and_cms_detector.tex
|
|
|
+04_tex: build/04_simulation_and_reconstruction.tex
|
|
|
+05_tex: build/05_tttt_measurement.tex
|
|
|
+06_tex: build/06_pixel_assembly.tex
|
|
|
+
|
|
|
+
|
|
|
+html: 00_html 01_html 02_html 03_html 04_html 05_html 06_html
|
|
|
$(PELICAN) $(BUILDDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
|
|
|
|
|
|
-pdf:
|
|
|
- ./convert.py tex
|
|
|
+pdf: 00_tex 01_tex 02_tex 03_tex 04_tex 05_tex 06_tex
|
|
|
cd $(BUILDDIR); rubber thesis
|
|
|
|
|
|
clean:
|
|
|
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
|
|
|
cd $(BUILDDIR); git clean -f -X
|
|
|
|
|
|
-regenerate:
|
|
|
- $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
|
|
|
-
|
|
|
serve:
|
|
|
ifdef PORT
|
|
|
cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT)
|
|
@@ -85,38 +80,12 @@ else
|
|
|
cd $(OUTPUTDIR) && $(PY) -m pelican.server
|
|
|
endif
|
|
|
|
|
|
-serve-global:
|
|
|
-ifdef SERVER
|
|
|
- cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 $(SERVER)
|
|
|
-else
|
|
|
- cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 0.0.0.0
|
|
|
-endif
|
|
|
-
|
|
|
-
|
|
|
-devserver:
|
|
|
-ifdef PORT
|
|
|
- $(BASEDIR)/develop_server.sh restart $(PORT)
|
|
|
-else
|
|
|
- $(BASEDIR)/develop_server.sh restart
|
|
|
-endif
|
|
|
-
|
|
|
-stopserver:
|
|
|
- $(BASEDIR)/develop_server.sh stop
|
|
|
- @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
|
|
|
-
|
|
|
publish: html pdf
|
|
|
$(PELICAN) $(BUILDDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
|
|
|
[ -f $(BUILDDIR)/thesis.pdf ] && cp $(BUILDDIR)/thesis.pdf $(OUTPUTDIR)
|
|
|
|
|
|
-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 -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
|
|
|
|
|
|
|
|
|
-github: publish
|
|
|
- ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR)
|
|
|
- git push origin $(GITHUB_PAGES_BRANCH)
|
|
|
-
|
|
|
-.PHONY: html pdf help clean regenerate serve serve-global devserver stopserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github
|
|
|
+.PHONY: html pdf help clean serve publish rsync_upload
|