Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save innyso/440c98a041c2dfaee8a71d1d1e07339c to your computer and use it in GitHub Desktop.
Save innyso/440c98a041c2dfaee8a71d1d1e07339c to your computer and use it in GitHub Desktop.
#makefile #calling #target #syntax

calling other targets with parameters in Makefile

build:
  docker-compose build

stop:
  docker-compose stop ${service}
  
remove:
  yes | docker-compose rm ${service}

up:
  docker-compose up -d

rebuild:
  $(MAKE) service=${service} stop
  $(MAKE) service=${service} remove
  $(MAKE) build
  $(MAKE) up

rebuild-portal:
  $(MAKE) service="portal" rebuild

rebuild-apps:
  $(MAKE) service="database portal" rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment