From 5a5f9afa05a1f4dfdcd559c0f28691a65bfc6b46 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 10 Jun 2019 20:37:34 -0700 Subject: 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. --- Makefile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d07f1b4..324207c 100644 --- a/Makefile +++ b/Makefile @@ -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) -- cgit v1.2.3