Skip to content

Instantly share code, notes, and snippets.

@brutus
Created February 28, 2023 14:47
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 brutus/7abd3161dc7d1249710dab2b9eb2f6e1 to your computer and use it in GitHub Desktop.
Save brutus/7abd3161dc7d1249710dab2b9eb2f6e1 to your computer and use it in GitHub Desktop.
Makefile & Stuff
# include ARGS dynamically
ifeq (run,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
# handle ENV file
include .envfile
export $(shell sed 's/=.*//' \.envfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment