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
|
|
|
|
|
|
|
contrib/src/readline.o: contrib/src/readline.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $< `pkg-config libedit --cflags`
|
2015-05-30 05:27:24 -04:00
|
|
|
|
|
|
|
test-readline: bin/picrin
|
2015-06-19 14:42:56 -04:00
|
|
|
for test in `ls contrib/30.readline/t/*.scm`; do \
|
2015-07-16 04:44:34 -04:00
|
|
|
$(TEST_RUNNER) $$test; \
|
2015-05-30 05:27:24 -04:00
|
|
|
done
|