Skip to content

Commit

Permalink
fix: makefile typos (#25)
Browse files Browse the repository at this point in the history
Sorry that my last commit left things in a broken state!

This fixes a couple of things:
1. The empty string creates errors for flags, empty needs to be
	actually empty
1. The generate-flags target needed indentation
  • Loading branch information
abangser authored Oct 20, 2023
1 parent 16eeaa5 commit 973fa4b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ SRC = $(wildcard $(SRCDIR)/*.mdd)
OUT = ${SRC:.mdd=.$(OUTPUT_FORMAT)}
DETACHED ?= false
BUILD ?= false
FLAGS = ""
export FLAGS

help: Makefile ## show list of commands
@echo "Choose a command run:"
@echo ""
@awk 'BEGIN {FS = ":.*?## "} /[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort

generate-flags:
if ${DETACHED}; then FLAGS += " --detach"; fi
if ${BUILD}; then FLAGS += " --build"; fi
ifeq ($(DETACHED),true)
FLAGS+= --detach
endif

ifeq ($(BUILD),true)
FLAGS+= --build
endif

generate-diagrams: $(OUT)

Expand Down

0 comments on commit 973fa4b

Please sign in to comment.