Makefile

Thu, 23 Mar 2023 12:14:53 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 23 Mar 2023 12:14:53 +0000
changeset 172
2c17151ed21b
parent 169
ecae87f5aaba
permissions
-rw-r--r--

client: Fix timeout handling

Previously, the timeout handler would fire an error that would get caught and
logged by the timer code. However that error never reached the upper levels of
scansion, leading to the whole thing just hanging.

Now we just trigger resumption of the async runner, and throw the error from
there if we haven't received the stanza yet.

With this change, timeouts are now correctly handled and reported as failures.

include config.unix

ifndef SQUISH
  $(error Please run ./configure first)
endif

SOURCE_FILES=$(shell $(SQUISH) --list-files)
MISSING_FILES=$(shell $(SQUISH) --list-missing-files)

SQUISH_PARAMS=--with-verse --with-server

OUTPUT=build/scansion

BIN_DIR=$(PREFIX)/bin

all: $(OUTPUT)

$(OUTPUT): build squishy $(SOURCE_FILES)
	$(SQUISH) $(SQUISH_PARAMS) --output=$(OUTPUT)

build:
	mkdir build

install: $(OUTPUT)
	install -t $(BIN_DIR) -m 755 $^

clean:
	rm $(OUTPUT)

test:
	busted

docker:
	docker build -t scansion .

.PHONY: all clean install docker test clean

mercurial