Add "bin" support to Cyc-installation-dir

This commit is contained in:
Justin Ethier 2019-03-17 18:45:55 -04:00
parent 1f7212a964
commit 41eaf8008b
2 changed files with 7 additions and 0 deletions

View file

@ -174,6 +174,7 @@ runtime.o : runtime.c $(HEADERS)
$(CCOMP) -c \
-DCYC_INSTALL_DIR=\"$(PREFIX)\" \
-DCYC_INSTALL_LIB=\"$(LIBDIR)\" \
-DCYC_INSTALL_BIN=\"$(BINDIR)\" \
-DCYC_INSTALL_INC=\"$(INCDIR)\" \
-DCYC_INSTALL_SLD=\"$(DATADIR)\" \
-DCYC_CC_PROG=\"$(CC_PROG)\" \

View file

@ -2561,6 +2561,12 @@ object Cyc_installation_dir(void *data, object cont, object type)
snprintf(buf, sizeof(buf), "%s", CYC_INSTALL_LIB);
make_utf8_string(data, str, buf);
_return_closcall1(data, cont, &str);
} else if (Cyc_is_symbol(type) == boolean_t &&
strncmp(((symbol) type)->desc, "bin", 5) == 0) {
char buf[1024];
snprintf(buf, sizeof(buf), "%s", CYC_INSTALL_BIN);
make_utf8_string(data, str, buf);
_return_closcall1(data, cont, &str);
} else if (Cyc_is_symbol(type) == boolean_t &&
strncmp(((symbol) type)->desc, "inc", 5) == 0) {
char buf[1024];