Skip to content

Commit

Permalink
Moved tcltk_if from main to parser, new file tcltk_open.cc in main.
Browse files Browse the repository at this point in the history
Tweaks and minor bug fixes.  New config subst. variable for -ldl.
  • Loading branch information
wrcad committed Aug 9, 2017
1 parent f8e4f28 commit 410df96
Show file tree
Hide file tree
Showing 18 changed files with 275 additions and 198 deletions.
46 changes: 29 additions & 17 deletions wrspice/bin/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,34 +165,46 @@ $(VLOG):
$(SECURE):
cd $(@D); $(MAKE)

$(BASE)/lib/ginterf.a:
cd $(BASED)/ginterf; $(MAKE)

$(BASE)/lib/gtkinterf.a:
cd $(BASED)/gtkinterf; $(MAKE)

$(BASE)/lib/miscutil.a:
cd $(BASED)/miscutil; $(MAKE)
if [ x$(NTREGEX) != x ]; then \
cd $(BASE)/miscutil/libregex; $(MAKE); \
fi

$(MOZY)/lib/gtkmozy.a:
cd $(MOZY)/src/gtkmozy; $(MAKE)
if [ -d $(MOZY)/src/gtkmozy ]; then \
cd $(MOZY)/src/gtkmozy; $(MAKE); \
fi

$(MOZY)/lib/help.a:
cd $(MOZY)/src/help; $(MAKE)
if [ -d $(MOZY)/src/help ]; then \
cd $(MOZY)/src/help; $(MAKE); \
fi

$(MOZY)/lib/htm.a:
cd $(MOZY)/src/htm; $(MAKE)
if [ -d $(MOZY)/src/htm ]; then \
cd $(MOZY)/src/htm; $(MAKE); \
fi

$(MOZY)/lib/httpget.a:
cd $(MOZY)/src/httpget; $(MAKE)
if [ -d $(MOZY)/src/httpget ]; then \
cd $(MOZY)/src/httpget; $(MAKE); \
fi

$(MOZY)/lib/imsave.a:
cd $(MOZY)/src/imsave; $(MAKE)
if [ -d $(MOZY)/src/imsave ] ; then \
cd $(MOZY)/src/imsave; $(MAKE); \
fi

$(MOZY)/lib/update_itf.a:
cd $(MOZY)/src/update_itf; $(MAKE)

$(BASE)/lib/ginterf.a:
cd $(BASED)/ginterf; $(MAKE)

$(BASE)/lib/gtkinterf.a:
cd $(BASED)/gtkinterf; $(MAKE)

$(BASE)/lib/miscutil.a:
cd $(BASED)/miscutil; $(MAKE)
if [ x$(NTREGEX) != x ]; then \
cd $(BASE)/miscutil/libregex; $(MAKE); \
if [ -d $(MOZY)/src/upd ]; then \
cd $(MOZY)/src/upd; $(MAKE); \
fi

#######################################################################
Expand Down
2 changes: 2 additions & 0 deletions wrspice/include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
LOCATION = wrspice/include
#######################################################################

dummy:

depend: reltag
@echo depending in $(LOCATION)

Expand Down
5 changes: 1 addition & 4 deletions wrspice/src/fte/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CCFILES = \
subexpand.cc sweep.cc trnames.cc types.cc vectors.cc
CCOBJS = $(CCFILES:.cc=.o)

$(LIB_TARGET): include $(CCOBJS)
$(LIB_TARGET): $(CCOBJS)
@if [ -f $(LIB_TARGET) ]; then \
rm -f $(LIB_TARGET); \
fi
Expand All @@ -46,9 +46,6 @@ $(LIB_TARGET): include $(CCOBJS)
paramsub.cc: $(BASE)/spnumber/paramsub.cc
cp -f $(BASE)/spnumber/paramsub.cc .

include:
cd ../../include; $(MAKE)

depend: paramsub.cc
@echo depending in $(LOCATION)
@if [ x$(DEPEND_DONE) = x ]; then \
Expand Down
5 changes: 1 addition & 4 deletions wrspice/src/misc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CCFILES = \
$(NFILES) texthelp.cc time.cc ttyio.cc vardb.cc verilog.cc wlist.cc
CCOBJS = $(CCFILES:.cc=.o)

$(LIB_TARGET): include $(CCOBJS)
$(LIB_TARGET): $(CCOBJS)
@if [ -f $(LIB_TARGET) ]; then \
rm -f $(LIB_TARGET); \
fi
Expand All @@ -43,9 +43,6 @@ hash.cc: $(BASE)/spnumber/hash.cc
spnumber.cc: $(BASE)/spnumber/spnumber.cc
spparse.cc: $(BASE)/spnumber/spparse.cc

include:
cd ../../include; $(MAKE)

depend: $(NFILES)
@echo depending in $(LOCATION)
@if [ x$(DEPEND_DONE) = x ]; then \
Expand Down
68 changes: 46 additions & 22 deletions xic/bin/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CFLAGS = @CFLAGSG@ @DYNAMIC_LIBS@ @NEEDINT64@ @UFLAGS@
LFLAGS = @LFLAGS@ @TOOLKITLFLAGS@ @UFLAGS@
LSHFLAG = @LSHFLAG@
LIBS = @LIBS@ @TOOLKITLIBS@ @EXTRALIBS@
LIBDL = @LIBDL@
STDCLIB = @STDCLIB@
OSNAME = @OSNAME@
ARCH = @ARCH@
Expand Down Expand Up @@ -125,11 +126,22 @@ plugins::
# sa-filetool will always rebuild fietool.o, to set a three-month lifetime
# for the binary.

sa-filetool: sa-filetool.o ../src/cd/cd.a ../src/fileio/fileio.a \
../src/geom/geom.a ../src/parser/parser.a $(BASE)/lib/miscutil.a
$(LINKCC) -o sa-filetool sa-filetool.o ../src/cd/cd.a \
../src/fileio/fileio.a ../src/geom/geom.a ../src/parser/parser.a \
../src/fileio/fileio.a $(BASE)/lib/miscutil.a -lm -lz $(STDCLIB)
FT_LIBS = \
../src/geom/geom.a \
../src/fileio/fileio.a \
../src/cd/cd.a \
../src/parser/parser.a \
../src/geom/geom.a \
../src/fileio/fileio.a \
../src/wrspif/wrspif.a \
$(BASE)/lib/miscutil.a \
$(BASE)/lib/malloc.a \
$(MOZY)/lib/httpget.a \
$(MOZY)/lib/update_itf.a

sa-filetool: sa-filetool.o $(FT_LIBS)
$(LINKCC) -o sa-filetool sa-filetool.o $(FT_LIBS) \
-lm -lz $(LIBDL) $(STDCLIB)
rm -f sa-filetool.o

wrencode: cryptmain.cc ../src/parser/parser.a $(BASE)/lib/miscutil.a
Expand Down Expand Up @@ -158,34 +170,46 @@ $(SUBDIR_LIBS) $(OA_SUBDIR)::
$(SECURE):
cd $(@D); $(MAKE)

$(BASE)/lib/ginterf.a:
cd $(BASED)/ginterf; $(MAKE)

$(BASE)/lib/gtkinterf.a:
cd $(BASED)/gtkinterf; $(MAKE)

$(BASE)/lib/miscutil.a:
cd $(BASED)/miscutil; $(MAKE)
if [ x$(NTREGEX) != x ]; then \
cd $(BASE)/miscutil/libregex; $(MAKE); \
fi

$(MOZY)/lib/gtkmozy.a:
cd $(MOZY)/src/gtkmozy; $(MAKE)
if [ -d $(MOZY)/src/gtkmozy ]; then \
cd $(MOZY)/src/gtkmozy; $(MAKE); \
fi

$(MOZY)/lib/help.a:
cd $(MOZY)/src/help; $(MAKE)
if [ -d $(MOZY)/src/help ]; then \
cd $(MOZY)/src/help; $(MAKE); \
fi

$(MOZY)/lib/htm.a:
cd $(MOZY)/src/htm; $(MAKE)
if [ -d $(MOZY)/src/htm ]; then \
cd $(MOZY)/src/htm; $(MAKE); \
fi

$(MOZY)/lib/httpget.a:
cd $(MOZY)/src/httpget; $(MAKE)
if [ -d $(MOZY)/src/httpget ]; then \
cd $(MOZY)/src/httpget; $(MAKE); \
fi

$(MOZY)/lib/imsave.a:
cd $(MOZY)/src/imsave; $(MAKE)
if [ -d $(MOZY)/src/imsave ] ; then \
cd $(MOZY)/src/imsave; $(MAKE); \
fi

$(MOZY)/lib/update_itf.a:
cd $(MOZY)/src/update_itf; $(MAKE)

$(BASE)/lib/ginterf.a:
cd $(BASED)/ginterf; $(MAKE)

$(BASE)/lib/gtkinterf.a:
cd $(BASED)/gtkinterf; $(MAKE)

$(BASE)/lib/miscutil.a:
cd $(BASED)/miscutil; $(MAKE)
if [ x$(NTREGEX) != x ]; then \
cd $(BASE)/miscutil/libregex; $(MAKE); \
if [ -d $(MOZY)/src/upd ]; then \
cd $(MOZY)/src/upd; $(MAKE); \
fi

#######################################################################
Expand Down
2 changes: 1 addition & 1 deletion xic/bin/xic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ main(int argc, char **argv)
_py_ = XM()->openPY();

// Start Tcl/Tk interface.
_tk_ = new cTclIf;
_tk_ = XM()->openTclTk();

if (dspPkgIf()->Initialize(gx)) {
XM()->Auth()->closeValidation();
Expand Down
2 changes: 2 additions & 0 deletions xic/include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
LOCATION = xic/include
#######################################################################

dummy:

depend: reltag
@echo depending in $(LOCATION)

Expand Down
4 changes: 4 additions & 0 deletions xic/include/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct sLcb;
struct updif_t;
struct cfilter_t;
class cPyIf;
class cTclIf;

namespace main_txtcmds {
struct bcel_t;
Expand Down Expand Up @@ -469,6 +470,9 @@ class cMain : public GRappCalls
// subwin.cc
void SubWindowExec(CmdDesc*);

// tcltk_open.cc
cTclIf *openTclTk();

// user_menu.cc
MenuBox *createUserMenu();

Expand Down
3 changes: 2 additions & 1 deletion xic/include/python_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class cPyIf
virtual ~cPyIf() { }

// Capability flag.
bool hasPy() { return (pyPtr != 0); }
bool hasPy() { return (pyAvail); }

// Wrapper for native script functions. This is never called unless
// the pyPtr is good.
Expand All @@ -86,6 +86,7 @@ class cPyIf

private:
cPy_base *pyPtr;
bool pyAvail;

static SymTab *py_functions;
static cPyIf *instancePtr;
Expand Down
12 changes: 5 additions & 7 deletions xic/include/tcltk_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class cTclIf
public:
friend inline cTclIf *TclIf() { return (cTclIf::ptr()); }

cTclIf();
cTclIf(cTcl_base*);
virtual ~cTclIf() { }

// Capability flags.
bool hasTcl() { return (has_tcl); }
bool hasTk() { return (has_tk); }
bool hasTcl() { return (tclAvail); }
bool hasTk() { return (tkAvail); }

// Wrapper for native script functions. This is never called unless
// the tclPtr is good.
Expand All @@ -89,11 +89,9 @@ class cTclIf
int, Tcl_Obj* const*));

private:
static void bang_tcl(const char*);

cTcl_base *tclPtr;
bool has_tcl;
bool has_tk;
bool tclAvail;
bool tkAvail;

static SymTab *tcl_functions;
static cTclIf *instancePtr;
Expand Down
2 changes: 1 addition & 1 deletion xic/src/main/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CCFILES = \
main_variables.cc measure.cc memory.cc menu.cc misc_menu.cc \
modeswitch.cc oa_if.cc onexit.cc open.cc pcell.cc pcell_params.cc \
promptline.cc promptline_setif.cc prpty.cc pushpop.cc py_open.cc \
save.cc scedif.cc select.cc signals.cc subwin.cc tcltk_if.cc \
save.cc scedif.cc select.cc signals.cc subwin.cc tcltk_open.cc \
user_menu.cc view_menu.cc
CCOBJS = $(CCFILES:.cc=.o)

Expand Down
Loading

0 comments on commit 410df96

Please sign in to comment.