almnck/Makefile

35 lines
990 B
Makefile
Raw Normal View History

# Define the source directory, read from the environment variable ALMANACK_ROOT
# Ensure to handle the case where ALMANACK_ROOT is not set
SRC_DIR := $(ALMANACK_ROOT)/web
ALMANACK_ROOT := $(ALMANACK_ROOT)
2023-12-13 00:10:12 -08:00
#
#
# Define the destination for rsync
DEST := boat:/var/local/www/www.almnck.com/
# Define the rsync options
RSYNC_OPTS := -avz --delete
# Define the default target, so it does nothing if just 'make' is run
.PHONY: default
default:
@echo "Please specify a target to run, e.g., 'make live' for live deployment."
# Define the 'live' target which will be triggered on 'make live'
.PHONY: live
live:
ifndef ALMANACK_ROOT
$(error ALMANACK_ROOT is undefined. Please export it before running 'make live'.)
endif
@rsync $(RSYNC_OPTS) $(SRC_DIR) $(DEST)
2023-12-13 00:10:12 -08:00
.PHONY: test-doc
test-doc:
ifndef ALMANACK_ROOT
$(error ALMANACK_ROOT is undefined. Please export it before running 'make test-doc'.)
endif
@echo Running doc-check-links
@sh $(ALMANACK_ROOT)/src/tests/doc-check-links | tapview