blob: cc098e6c7e65a8d9cf316d43713e9ef9758f2235 (
plain) (
tree)
|
|
# Makefile for Velstandsfanden website.
#
# The site is mainly a faircamp site, but with a few external
# resources. As faircamp itself is not meant to build a full
# website, we tie it all together using a Makefile.
#
all: build
#
# Include local overrides
#
-include Makefile.local
#
# Override these variables by setting creating a "Makefile.local"
# and defined them there. Only the variables you want to override
# needs to be defined in Makefile.local
#
FAIRCAMP_BIN?=faircamp
CATALOG_DIR?=./faircamp
BUILD_DIR?=$(CATALOG_DIR)/.faircamp_build
build:
$(FAIRCAMP_BIN) --catalog-dir=$(CATALOG_DIR)
python aggregator/aggregator.py refresh
cp sider/*.{html,jpg} $(BUILD_DIR)/
#
# Deploying will only work if the DEPLOY_TARGET variable is set.
# Define it in "Makefile.local". It should typically be something
# like:
#
# username@example.com:target_path
#
deploy: build
ifndef DEPLOY_TARGET
$(error "DEPLOY_TARGET must be set!")
endif
rsync -avzz $(BUILD_DIR)/* $(DEPLOY_TARGET)
#
# Since we have content external to Faircamp included in the site,
# use a simple web server to serve the preview instead of the one
# built into faircamp
#
preview: build
devd -a $(BUILD_DIR)
|