Title is self explainatory.

Thank you for your time,
-Chase
From 04a7b4c8e33c721453c2e0cc311d96460e8d8f1b Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Mon, 15 Feb 2021 19:27:54 -0600
Subject: [PATCH] dthelp/parser/canon1: get it to build

---
 cde/.gitignore                                | 41 ++++++++++++++
 cde/configure.ac                              |  6 ++
 cde/programs/dthelp/parser/Makefile.am        |  4 +-
 .../dthelp/parser/canon1/build/Makefile.am    | 55 +++++++++++++++++++
 .../dthelp/parser/canon1/eltdef/Makefile.am   | 53 ++++++++++++++++++
 .../dthelp/parser/canon1/helptag/Makefile.am  | 43 +++++++++++++++
 .../dthelp/parser/canon1/parser/Makefile.am   | 49 +++++++++++++++++
 .../dthelp/parser/canon1/util/Makefile.am     | 21 +++++++
 8 files changed, 270 insertions(+), 2 deletions(-)
 create mode 100644 cde/programs/dthelp/parser/canon1/build/Makefile.am
 create mode 100644 cde/programs/dthelp/parser/canon1/eltdef/Makefile.am
 create mode 100644 cde/programs/dthelp/parser/canon1/helptag/Makefile.am
 create mode 100644 cde/programs/dthelp/parser/canon1/parser/Makefile.am
 create mode 100644 cde/programs/dthelp/parser/canon1/util/Makefile.am

diff --git a/cde/.gitignore b/cde/.gitignore
index 35e050793..4972fbb7b 100644
--- a/cde/.gitignore
+++ b/cde/.gitignore
@@ -517,6 +517,47 @@ programs/dtexec/DtSvcLock.h
 programs/dtexec/MsgLog.c
 
 # programs/dthelp
+programs/dthelp/parser/canon1/build/arc.h
+programs/dthelp/parser/canon1/build/build
+programs/dthelp/parser/canon1/build/case.c
+programs/dthelp/parser/canon1/build/context.h
+programs/dthelp/parser/canon1/build/delim.dat
+programs/dthelp/parser/canon1/build/delim.h
+programs/dthelp/parser/canon1/build/dtd.h
+programs/dthelp/parser/canon1/build/entity.h
+programs/dthelp/parser/canon1/build/error
+programs/dthelp/parser/canon1/build/template
+programs/dthelp/parser/canon1/eltdef/case.c
+programs/dthelp/parser/canon1/eltdef/context.h
+programs/dthelp/parser/canon1/eltdef/delim.dat
+programs/dthelp/parser/canon1/eltdef/delim.h
+programs/dthelp/parser/canon1/eltdef/efile.c
+programs/dthelp/parser/canon1/eltdef/eltdef
+programs/dthelp/parser/canon1/eltdef/entfile.c
+programs/dthelp/parser/canon1/eltdef/entity2.h
+programs/dthelp/parser/canon1/eltdef/error
+programs/dthelp/parser/canon1/eltdef/estring.h
+programs/dthelp/parser/canon1/eltdef/globdec.h
+programs/dthelp/parser/canon1/eltdef/globdef.h
+programs/dthelp/parser/canon1/eltdef/if.h
+programs/dthelp/parser/canon1/eltdef/pfile.c
+programs/dthelp/parser/canon1/eltdef/pval.h
+programs/dthelp/parser/canon1/eltdef/sfile.c
+programs/dthelp/parser/canon1/eltdef/signon.h
+programs/dthelp/parser/canon1/eltdef/signonx.h
+programs/dthelp/parser/canon1/eltdef/stfile.c
+programs/dthelp/parser/canon1/eltdef/tfile.c
+programs/dthelp/parser/canon1/helptag/LocaleXlate.c
+programs/dthelp/parser/canon1/helptag/XlationSvc.c
+programs/dthelp/parser/canon1/parser/dthelp_ctag1
+programs/dthelp/parser/canon1/parser/case.c
+programs/dthelp/parser/canon1/parser/context.h
+programs/dthelp/parser/canon1/parser/delim.dat
+programs/dthelp/parser/canon1/parser/delim.h
+programs/dthelp/parser/canon1/parser/error
+programs/dthelp/parser/canon1/parser/parser
+programs/dthelp/parser/canon1/util/context
+programs/dthelp/parser/canon1/util/fclndir
 programs/dthelp/parser/pass1/build/arc.h
 programs/dthelp/parser/pass1/build/build
 programs/dthelp/parser/pass1/build/case.c
diff --git a/cde/configure.ac b/cde/configure.ac
index 9d30ce995..969faa1ff 100644
--- a/cde/configure.ac
+++ b/cde/configure.ac
@@ -520,6 +520,12 @@ programs/dthelp/parser/pass1/build/Makefile
 programs/dthelp/parser/pass1/eltdef/Makefile
 programs/dthelp/parser/pass1/helptag/Makefile
 programs/dthelp/parser/pass1/parser/Makefile
+programs/dthelp/parser/canon1/Makefile
+programs/dthelp/parser/canon1/util/Makefile
+programs/dthelp/parser/canon1/build/Makefile
+programs/dthelp/parser/canon1/eltdef/Makefile
+programs/dthelp/parser/canon1/helptag/Makefile
+programs/dthelp/parser/canon1/parser/Makefile
 programs/dthelp/parser/helptag/Makefile
 
 programs/nsgmls/Makefile
diff --git a/cde/programs/dthelp/parser/Makefile.am b/cde/programs/dthelp/parser/Makefile.am
index 549ce80f6..af5381c79 100644
--- a/cde/programs/dthelp/parser/Makefile.am
+++ b/cde/programs/dthelp/parser/Makefile.am
@@ -1,5 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-SUBDIRS = pass1 helptag
+SUBDIRS = pass1 canon1 helptag
 
-#NOTYET canon1 pass2
+#NOTYET pass2
diff --git a/cde/programs/dthelp/parser/canon1/build/Makefile.am b/cde/programs/dthelp/parser/canon1/build/Makefile.am
new file mode 100644
index 000000000..e82964b05
--- /dev/null
+++ b/cde/programs/dthelp/parser/canon1/build/Makefile.am
@@ -0,0 +1,55 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_PROGRAMS = build
+
+HELPTAG       = ..
+HELPTAGSRC    = $(HELPTAG)/helptag
+HELPPARSERSRC = $(HELPTAG)/parser
+HELPELTDEFSRC = $(HELPTAG)/eltdef
+HELPDTDFILE   = $(HELPTAGSRC)/hptag.dtd
+HELPUTILSRC   = $(HELPTAG)/util
+HELPBUILDSRC  = $(HELPTAG)/build
+HELPUTILLIB   = $(HELPTAG)/util/libutil.a
+
+build_CFLAGS = -I$(HELPUTILSRC)
+
+build_LDADD = ../util/libutil.a
+
+build_SOURCES = build.c buildutl.c eltree.c except.c fsa.c out.c param.c \
+		scan.c sref.c tree.c
+
+CHPRODS = context.h delim.h
+CCPRODS = case.c
+
+BHPRODS = arc.h dtd.h entity.h
+BCPRODS =
+
+CTRASH  = error delim.dat
+BTRASH  = error template
+
+CPRODS  = $(CHPRODS) $(CCPRODS)
+BPRODS  = $(BHPRODS) $(BCPRODS)
+TRASH   = error delim.dat template
+
+BUILT_SOURCES = $(CPRODS) $(BPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(TRASH) BDONE CDONE
+
+# We want the commands that actually create BPRODS and CPRODS to only
+# run once during a make so we gate them using these CDONE and BDONE
+# targets.  This allows us to enable parallel building too.
+$(BPRODS): BDONE
+
+$(CPRODS): CDONE
+
+# build the BRPODS
+BDONE: ./build $(HELPDTDFILE)
+	$(RM) $(BPRODS) $(BTRASH) && ./build -m < $(HELPDTDFILE) && touch BDONE
+
+
+# build the CRPODS
+CDONE: $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.bld context.dat
+	$(RM) $(CPRODS) $(CTRASH)
+	$(CP) $(HELPTAGSRC)/delim.bld delim.dat # appl.-specific delim.dat
+	$(HELPUTILSRC)/context sparse
+	touch CDONE
+
diff --git a/cde/programs/dthelp/parser/canon1/eltdef/Makefile.am b/cde/programs/dthelp/parser/canon1/eltdef/Makefile.am
new file mode 100644
index 000000000..9d0453243
--- /dev/null
+++ b/cde/programs/dthelp/parser/canon1/eltdef/Makefile.am
@@ -0,0 +1,53 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_PROGRAMS = eltdef
+
+HELPTAG       = ..
+HELPTAGSRC    = $(HELPTAG)/helptag
+HELPPARSERSRC = $(HELPTAG)/parser
+HELPELTDEFSRC = $(HELPTAG)/eltdef
+HELPDTDFILE   = $(HELPTAGSRC)/hptag.dtd
+HELPUTILSRC   = $(HELPTAG)/util
+HELPBUILDSRC  = $(HELPTAG)/build
+HELPUTILLIB   = $(HELPTAG)/util/libutil.a
+HELPIFFILE    = $(HELPTAGSRC)/help.if
+HELPTSSFILE   = $(HELPTAGSRC)/htag.tss
+
+eltdef_LDADD = $(HELPUTILLIB)
+
+eltdef_CFLAGS = -I$(HELPUTILSRC) -I$(HELPBUILDSRC)
+
+eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c
+
+CCPRODS = case.c
+ECPRODS = efile.c entfile.c pfile.c sfile.c stfile.c tfile.c
+
+CHPRODS = context.h delim.h
+EHPRODS = entity2.h globdec.h globdef.h if.h pval.h signon.h signonx.h
+
+CPRODS  = $(CCPRODS) $(CHPRODS)
+EPRODS  = $(ECPRODS) $(EHPRODS)
+
+CTRASH  = delim.dat error
+ETRASH  = estring.h error
+TRASH   = delim.dat estring.h error
+
+BUILT_SOURCES = $(CPRODS) $(EPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(TRASH) CDONE EDONE
+
+$(CPRODS): CDONE
+
+$(EPRODS): EDONE
+
+
+EDONE: eltdef  $(HELPIFFILE) $(HELPTSSFILE)
+	$(RM) $(EPRODS) $(ETRASH)
+	./eltdef $(HELPIFFILE)
+	touch EDONE
+
+CDONE:  $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.elt context.dat
+	$(RM) $(CPRODS) $(CTRASH)
+	$(CP) $(HELPTAGSRC)/delim.elt delim.dat  # appl.-specific delim.dat
+	$(HELPUTILSRC)/context
+	touch CDONE
+
diff --git a/cde/programs/dthelp/parser/canon1/helptag/Makefile.am b/cde/programs/dthelp/parser/canon1/helptag/Makefile.am
new file mode 100644
index 000000000..c4fe13201
--- /dev/null
+++ b/cde/programs/dthelp/parser/canon1/helptag/Makefile.am
@@ -0,0 +1,43 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+# Due to the wierd interdepencencies between helptag and parser,
+# disable parallel builds here.  This is some really horrible code and
+# design - not surprising since it dates to 1989.
+.NOTPARALLEL:
+
+HELPTAG       = ..
+HELPTAGSRC    = $(HELPTAG)/helptag
+HELPPARSERSRC = $(HELPTAG)/parser
+HELPELTDEFSRC = $(HELPTAG)/eltdef
+HELPDTDFILE   = $(HELPTAGSRC)/hptag.dtd
+HELPUTILSRC   = $(HELPTAG)/util
+HELPBUILDSRC  = $(HELPTAG)/build
+HELPUTILLIB   = $(HELPTAG)/util/libutil.a
+HELPIFFILE    = $(HELPTAGSRC)/help.if
+HELPTSSFILE   = $(HELPTAGSRC)/htag.tss
+
+XLATESRCS = XlationSvc.c LocaleXlate.c
+
+XLATESRCDIR = ${top_srcdir}/lib/DtSvc/DtUtil2
+
+$(XLATESRCS): XDONE
+
+XDONE: $(XLATESRCDIR)/XlationSvc.c $(XLATESRCDIR)/LocaleXlate.c
+	$(RM) $(XLATESRCS)
+	$(CP) $(XLATESRCDIR)/XlationSvc.c XlationSvc.c
+	$(CP) $(XLATESRCDIR)/LocaleXlate.c LocaleXlate.c
+	cd ../parser; $(MAKE) CDONE
+	touch XDONE
+
+BUILT_SOURCES = $(XLATESRCS)
+CLEANFILES = $(BUILT_SOURCES) XDONE
+
+AM_CPPFLAGS = -I$(HELPPARSERSRC) -I$(HELPUTILSRC) \
+	    -I$(HELPELTDEFSRC) -I$(XLATESRCDIR) $(DT_INCDIR)
+
+# needed by parser/
+noinst_LIBRARIES = libhelptag.a
+libhelptag_a_SOURCES = custom.c default.c help.c make.c option.c	\
+		      special.c out.c xref.c $(XLATESRCS)		\
+		      global.c ../parser/delim.h
+
diff --git a/cde/programs/dthelp/parser/canon1/parser/Makefile.am b/cde/programs/dthelp/parser/canon1/parser/Makefile.am
new file mode 100644
index 000000000..ee060ca76
--- /dev/null
+++ b/cde/programs/dthelp/parser/canon1/parser/Makefile.am
@@ -0,0 +1,49 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+bin_PROGRAMS = dthelp_ctag1
+
+# Due to the wierd interdepencencies between helptag and parser,
+# disable parallel builds here.  This is some really horrible code and
+# design - not surprising since it dates to 1989.
+.NOTPARALLEL:
+
+HELPTAG       = ..
+HELPTAGSRC    = $(HELPTAG)/helptag
+HELPPARSERSRC = $(HELPTAG)/parser
+HELPELTDEFSRC = $(HELPTAG)/eltdef
+HELPDTDFILE   = $(HELPTAGSRC)/hptag.dtd
+HELPUTILSRC   = $(HELPTAG)/util
+HELPBUILDSRC  = $(HELPTAG)/build
+HELPUTILLIB   = $(HELPTAG)/util/libutil.a
+
+AM_CPPFLAGS = -I$(HELPUTILSRC) -I$(HELPTAGSRC) -I$(HELPBUILDSRC) \
+	   -I$(HELPELTDEFSRC)
+
+dthelp_ctag1_SOURCES = parser.c actutil.c \
+        closent.c code.c cyclent.c dcurelt.c \
+        end.c entity.c \
+        error.c getsign.c \
+        input.c level.c lookent.c \
+        minim.c optstrg.c param.c parent.c \
+        parutil.c pi.c \
+        scan.c setpar.c start.c string.c struct.c \
+        text.c
+
+APPLOBJECTS = ../helptag/libhelptag.a
+
+dthelp_ctag1_LDADD = $(APPLOBJECTS) $(HELPUTILLIB) $(DTCLIENTLIBS) $(XTOOLLIB)
+
+CPRODS = case.c context.h delim.h
+CTRASH = error delim.dat
+
+BUILT_SOURCES = $(CPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(CTRASH) CDONE
+
+$(CPRODS): CDONE
+
+CDONE:  $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.par context.dat
+	$(RM) $(CPRODS) $(CTRASH)
+	$(CP) $(HELPTAGSRC)/delim.par delim.dat  # appl.-specific delim.dat
+	$(HELPUTILSRC)/context
+	touch CDONE
+
diff --git a/cde/programs/dthelp/parser/canon1/util/Makefile.am b/cde/programs/dthelp/parser/canon1/util/Makefile.am
new file mode 100644
index 000000000..4826cd82e
--- /dev/null
+++ b/cde/programs/dthelp/parser/canon1/util/Makefile.am
@@ -0,0 +1,21 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_LIBRARIES = libutil.a
+
+noinst_PROGRAMS = context fclndir
+
+context_SOURCES = context.c
+
+fclndir_SOURCES = context.c
+
+libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c		\
+	triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c	\
+	conutil.c error.c exit.c itoa.c lower.c malloc.c openchk.c	\
+	trie.c triecnt.c upper.c whitesp.c basic.h common.h		\
+	dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h	\
+	entext.h sref.h version.h
+
+# FIXME I think emptyfil.c and fclndir.c can be deleted?
+
+context_LDADD = libutil.a
+fclndir_LDADD = libutil.a
-- 
2.17.1

_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to