Implementation Guidelines - GetPoplog/Seed GitHub Wiki
GetPoplog seeks to provide automation of the build and packaging process using familiar Unix tools. We try to keep our dependencies relatively light and very widely available on all Unixes.
/bin/bashis our preferred scripting language./bin/dashis an acceptable alternative for scripting.
GNU Makeis our preferred build tool.- We hope to move to
justin the not-too-distant future.
- We hope to move to
Python3- any version that is at least 6 months old.- Python2 is not acceptable.
Makefile
The makefile should have a standard prelude, shown below:
################################################################################
### Standard Makefile intro
################################################################################
# Important check
MAKEFLAGS+=--warn-undefined-variables
# Causes the commands in a recipe to be issued in the same shell (beware cd commands not executed in a subshell!)
.ONESHELL:
SHELL:=/bin/bash
# When using ONESHELL, we want to exit on error (-e) and error if a command fails in a pipe (-o pipefail)
# When overriding .SHELLFLAGS one must always add a tailing `-c` as this is the default setting of Make.
.SHELLFLAGS:=-e -o pipefail -c
# Invoke the all target when no target is explicitly specified.
.DEFAULT_GOAL:=help
# Delete targets if their recipe exits with a non-zero exit code.
.DELETE_ON_ERROR: