Skip to content

Instantly share code, notes, and snippets.

@masutaka
Last active March 26, 2020 13:40
Show Gist options
  • Save masutaka/9fa8ae6b3f8029bbcc6d88c161e82886 to your computer and use it in GitHub Desktop.
Save masutaka/9fa8ae6b3f8029bbcc6d88c161e82886 to your computer and use it in GitHub Desktop.
--- Makefile.orig 2020-03-26 22:38:05.000000000 +0900
+++ Makefile 2020-03-26 22:39:57.000000000 +0900
@@ -1,9 +1,10 @@
+DIRENV := direnv
MAKE := make
TARGETS := aws heroku
define make-r
@for i in $(TARGETS); do \
- $(MAKE) -w -C terraform/$$i $(1) || exit $$?; \
+ $(DIRENV) exec $$i $(MAKE) -w -C terraform/$$i $(1) || exit $$?; \
done
endef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment