summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--Makefile18
-rw-r--r--genvim.txr6
-rw-r--r--lisplib.c5
-rw-r--r--share/txr/stdlib/place.tl (renamed from place.tl)0
5 files changed, 22 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 60d759f5..40a431ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2015-06-20 Kaz Kylheku <kaz@kylheku.com>
+ Remove places.h generation hack.
+
+ * Makefile (GEN_HDRS, LISP_TO_C_STRING): Variables removed.
+ (%.h: %.tl): Rule removed. The place.h header is no longer
+ generated from place.tl.
+
+ * lisplib.c (place_instantiate): Load place.tl from stdlib directory,
+ rather than obtaining it from a string literal in generated header
+ place.h.
+
+ * place.tl: Moved to share/txr/stdlib directory.
+
+ * genvim.txr: Refer to place.tl in stdlib.
+
+2015-06-20 Kaz Kylheku <kaz@kylheku.com>
+
* eval.c (eval_init): Register have function, synonym of true.
* txr.1: Document have.
diff --git a/Makefile b/Makefile
index 7f8532db..35ffcdf4 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,6 @@ OBJS-$(have_syslog) += syslog.o
OBJS-$(have_glob) += glob.o
OBJS-$(have_posix_sigs) += signal.o
EXTRA_OBJS-$(add_win_res) += win/txr.res
-GEN_HDRS := place.h
ifneq ($(have_git),)
SRCS := $(addprefix $(top_srcdir)/,\
@@ -108,13 +107,6 @@ $(call ABBREV,LINK)
$(V)$(CC) $(1) $(CFLAGS) -o $@ $^ -lm
endef
-define LISP_TO_C_STRING
-$(call ABBREV,L2C)
-$(V)echo "const char *${@:.h=}_code =" > $@
-$(V)sed -e 's/;.*//' -e 's/["\\]/\\&/g' -e 's/$$/\\n/' -e 's/.*/"&"/' $< >> $@
-$(V)echo ";" >> $@
-endef
-
define WINDRES
$(call ABBREV,RES)
$(V)mkdir -p $(dir $@)
@@ -139,9 +131,6 @@ opt/%.res: win/%.rc
%.res: %.rc
$(call WINDRES)
-%.h: %.tl
- $(call LISP_TO_C_STRING)
-
# The following pattern rule is used for test targets built by configure
%.o: %.c
$(call COMPILE_C)
@@ -168,10 +157,6 @@ $(PROG)-win: $(patsubst %/txr.o,%/txr-win.o,$(OPT_OBJS)) $(EXTRA_OBJS-y)
$(PROG)-win-dbg: $(patsubst %/txr.o,%/txr-win.o,$(DBG_OBJS)) $(EXTRA_OBJS-y)
$(call LINK_PROG,-mwindows)
-$(call ADD_CONF,dbg,lisplib.o): $(GEN_HDRS)
-
-$(call ADD_CONF,opt,lisplib.o): $(GEN_HDRS)
-
VPATH := $(top_srcdir)
# Newline constant
@@ -242,13 +227,12 @@ distclean:
rm -rf config
rm -rf config.*
rm -rf mpi-1.?.?
- rm -rf $(GEN_HDRS)
else
rebuild: clean repatch $(PROG)
clean: conftest.clean tests.clean
rm -f $(PROG)$(EXE) $(PROG)-dbg$(EXE) y.tab.c lex.yy.c y.tab.h y.output
- rm -rf opt dbg $(EXTRA_OBJS-y) $(GEN_HDRS)
+ rm -rf opt dbg $(EXTRA_OBJS-y)
distclean: clean
rm -rf $(conf_dir)
diff --git a/genvim.txr b/genvim.txr
index cd0c7cde..785db7e5 100644
--- a/genvim.txr
+++ b/genvim.txr
@@ -7,9 +7,9 @@ static void dir_tables_init(void)
@(until)
}
@(end)
-@(next @(open-files '("eval.c" "rand.c" "signal.c" "stream.c" "gc.c" "glob.c"
- "syslog.c" "filter.c" "txr.c" "arith.c" "unwind.c"
- "sysif.c" "place.tl")))
+@(next @(open-files ^(#*"eval.c rand.c signal.c stream.c gc.c glob.c"
+ #*"syslog.c filter.c txr.c arith.c unwind.c"
+ ,*#`sysif.c @stdlib/place.tl`)))
@(collect)
@ (block)
@ (cases)
diff --git a/lisplib.c b/lisplib.c
index f84b47b6..33277b7b 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -35,7 +35,6 @@
#include "stream.h"
#include "hash.h"
#include "gc.h"
-#include "place.h"
#include "txr.h"
#include "lisplib.h"
@@ -79,8 +78,8 @@ static val place_set_entries(val dlt, val fun)
static val place_instantiate(val set_fun)
{
funcall1(set_fun, nil);
- return eval_intrinsic(lisp_parse(string_utf8(place_code), std_error,
- colon_k, lit("place.tl")), nil);
+ load(format(nil, lit("~a/place.tl"), stdlib_path, nao));
+ return nil;
}
static val ver_set_entries(val dlt, val fun)
diff --git a/place.tl b/share/txr/stdlib/place.tl
index 83c2d813..83c2d813 100644
--- a/place.tl
+++ b/share/txr/stdlib/place.tl