Skip to content

Instantly share code, notes, and snippets.

@efraintorlo
Last active June 1, 2016 00:37
Show Gist options
  • Select an option

  • Save efraintorlo/9f8b3e174c07fd63affc208bbbb0ff2e to your computer and use it in GitHub Desktop.

Select an option

Save efraintorlo/9f8b3e174c07fd63affc208bbbb0ff2e to your computer and use it in GitHub Desktop.
Define and call function with aarguments
warning_plot:
ifeq ($(RUN_NAME), last_run)
$(call example_line,"plot")
@exit 1
endif
warning_replot:
ifeq ($(RUN_NAME), last_run)
$(call example_line,"replot")
@exit 1
endif
warning_run:
ifeq ($(RUN_NAME), last_run)
$(call example_line,"run")
@exit 1
endif
define example_line =
@echo -e "------------------------------------------------\n"
@echo -e "$(REDC)WARNING:$(ENDC) \n"
@echo -e "Set the RUN_NAME\n"
@echo -e "EXAMPLE:\n"
@echo -e "$(GREENC)make $(1) RUN_NAME=my_run_name$(ENDC)\n"
@echo -e "------------------------------------------------\n"
endef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment