Commit 7908ba80 authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

refactor: remove the file symbols_list2.h

The file symbols_list2.h was automatically generated from the file
symbols_list.h for dpp. This commit unifies said structure definition and
removes a step for generating symbols_list2.h.

From now on at runtime the structurecl_symbol_initializer has an additional
element storing the function name. That will help solving #543.
parent a67d16bb
......@@ -155,7 +155,7 @@ clean:
-for %f in ($(OBJS) all_symbols.obj all_symbols2.obj) do $(RM) %f
-$(RM) *.pdb
-for %f in (..\ecl\config.h dpp dpp.obj $(DPP) cut.exe cut.obj \
..\eclmin.lib ..\cinit.obj cinit.c symbols_list2.h) \
..\eclmin.lib ..\cinit.obj cinit.c) \
do $(RM) %f
-for %f in (..\ecl\*.h) do $(RM) %f
-for %f in (cut.exe cut.obj dpp.exe dpp.obj) do $(RM) %f
......@@ -164,7 +164,7 @@ clean:
# Build rules
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../ecl/config.h ../ecl/config-internal.h
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list.h ../ecl/config.h ../ecl/config-internal.h
$(CC) /nologo -I.. -I./ $(srcdir)/dpp.c /Fe$@
$(HFILES): ../ecl/config.h.msvc6 ../ecl/config-internal.h.msvc6 Makefile
-mkdir ..\ecl\impl
......
......@@ -102,23 +102,12 @@ clean:
# Build rules
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list.h
if test -f ../CROSS-DPP; then touch dpp; else \
$(TRUE_CC) -I$(srcdir) -I@true_builddir@ -I./ $(srcdir)/dpp.c @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -o $@ ; \
fi
$(OBJS): $(DPP)
# symbols_list2.h is built this way to allow for an atomic replacement of
# the file. Otherwise we have problem when doing concurrent builds with
# rsync updates of the source tree.
#
$(srcdir)/symbols_list2.h: $(srcdir)/symbols_list.h Makefile
cat $(srcdir)/symbols_list.h | \
sed -e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,[ ]*\([^,]*\),.*}%{\1,NULL,\2}%g' \
-e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),[ ]*\([^,]*\),.*}%{\1,"\2",\3}%g' \
-e 's%{NULL.*%{NULL,NULL,-1}};%' | \
sed -e 's%"\(IF_[A-Z0-9]*\)(\([^)]*\))"%\1("\2")%g' > tmp.h
mv tmp.h $@
#
# This reduces the overhead of jumping to other functions
......
......@@ -93,7 +93,7 @@
#define DPP
#include <ecl/config.h>
#include <ecl/config-internal.h>
#include "symbols_list2.h"
#include "symbols_list.h"
/* #define POOLSIZE 2048 */
#define POOLSIZE 4096
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -207,9 +207,7 @@
@tab symbols
@item @file{symbols_list.h}
@item @file{symbols_list2.h}
@tab The latter is generated from the first. The first has to contain all
symbols on the system which aren't local.
@tab The file has contains all symbols defined in the core.
@item @file{tcp.d}
@tab stream interface to TCP
......
......@@ -310,9 +310,10 @@ extern ECL_API cl_object si_mangle_name _ECL_ARGS((cl_narg narg, cl_object symbo
typedef union {
struct {
const char *name;
int type;
const char *translation;
void *fun;
short narg;
int narg;
int type;
cl_object value;
} init;
struct ecl_symbol data;
......
......@@ -201,7 +201,6 @@
"c/structure.d"
"c/symbol.d"
"c/symbols_list.h"
"c/symbols_list2.h"
"c/tcp.d"
"c/threads/atomic.d"
"c/threads/barrier.d"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment