Last active
June 1, 2016 00:37
-
-
Save efraintorlo/9f8b3e174c07fd63affc208bbbb0ff2e to your computer and use it in GitHub Desktop.
Define and call function with aarguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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