2015-05-30 05:13:55 -04:00
|
|
|
libedit_exists := $(shell pkg-config libedit --exists; echo $$?)
|
2015-05-30 04:58:25 -04:00
|
|
|
|
2015-05-30 05:13:55 -04:00
|
|
|
ifeq ($(libedit_exists),0)
|
2015-06-19 14:42:56 -04:00
|
|
|
CONTRIB_SRCS += contrib/30.readline/src/readline.c
|
2015-05-30 05:13:55 -04:00
|
|
|
CONTRIB_INITS += readline
|
2015-05-30 05:27:24 -04:00
|
|
|
CONTRIB_TESTS += test-readline
|
2015-05-30 05:13:55 -04:00
|
|
|
LDFLAGS += `pkg-config libedit --libs`
|
|
|
|
endif
|
2015-05-30 04:58:25 -04:00
|
|
|
|
2016-08-12 04:28:38 -04:00
|
|
|
contrib/30.readline/src/readline.o: contrib/30.readline/src/readline.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $< `pkg-config libedit --cflags`
|
2015-05-30 05:27:24 -04:00
|
|
|
|
2017-03-22 10:59:22 -04:00
|
|
|
test-readline: $(TEST_RUNNER)
|
2015-06-19 14:42:56 -04:00
|
|
|
for test in `ls contrib/30.readline/t/*.scm`; do \
|
2017-03-22 10:59:22 -04:00
|
|
|
./$(TEST_RUNNER) $$test; \
|
2015-05-30 05:27:24 -04:00
|
|
|
done
|