Skip to content

Instantly share code, notes, and snippets.

@OlivierBinette
Created August 8, 2022 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OlivierBinette/300d995a4da3e810a6cbd71cb97e0ff0 to your computer and use it in GitHub Desktop.
Save OlivierBinette/300d995a4da3e810a6cbd71cb97e0ff0 to your computer and use it in GitHub Desktop.
Makefile template
## Development utilities for XX
##
## Usage:
## make <target> [<arg>=<value> ...]
##
## Targets:
## help: Show this help message.
## env: Create or update conda environment "XX"
ENV?=XX
.PHONY: help env
help: makefile
@sed -n "s/^##//p" $<
env: environment.yml
@(echo "Creating ${ENV} environment..."; conda env create -f $<) \
|| (echo "Updating ${ENV} environment...\n"; conda env update -f $<)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment