diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-06-10 20:37:34 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-06-10 20:37:34 -0700 |
| commit | 5a5f9afa05a1f4dfdcd559c0f28691a65bfc6b46 (patch) | |
| tree | f7c03498ce9fd6dd86ae3c9386349b1fbb73eebe /Makefile | |
| parent | 86c8bed803356d6855e75bd364085f9cf8717b9e (diff) | |
Updated with some cleaner behavior for PICK and added SPIN. Also removed
command line flags in favor of manually using `tput rmcup`. Updated the
documentation.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -4,9 +4,7 @@ CC=gcc CFLAGS=-O0 -std=gnu99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN= -Wall -Wpedantic -Wno-unknown-pragmas -fsanitize=address -fno-omit-frame-pointer G=-g -PICK= -ASK= -ASKECHO= +PICKER= ifeq ($(shell uname),Darwin) CFLAGS += -D_DARWIN_C_SOURCE @@ -16,24 +14,17 @@ endif ifneq (, $(shell which ask)) ifeq (, $(ASKECHO)$(ASK)) -ASKECHO="ask --prompt=\"" prompt "\" --query=\"" initial "\"" +CFLAGS += -D'ASKECHO(prompt,initial)="ask --prompt=\"" prompt "\" --query=\"" initial "\""' endif -ifeq (, $(PICK)) -PICK="ask --prompt=\"" prompt "\" --query=\"" initial "\"" +ifeq (, $(PICKER)) +PICKER=ask endif endif -ifneq (, $(ASKECHO)) -CFLAGS += -D'ASKECHO(prompt,initial)=$(ASKECHO)' +ifneq (, $(PICKER)) +CFLAGS += -D'PICK(prompt, initial)="$(PICKER) --prompt=\"" prompt "\" --query=\"" initial "\""' endif -ifneq (, $(ASK)) -CFLAGS += -D'ASK(var,prompt,initial)=$(ASK)' -endif - -ifneq (, $(PICK)) -CFLAGS += -D'PICK(prompt, initial)=$(PICK)' -endif all: $(NAME) |
