Skip to content

Commit 5eb5ba5

Browse files
author
Akiva Werner
committed
Added basic docs in top-level folder
1 parent 1b449fc commit 5eb5ba5

File tree

4 files changed

+350
-0
lines changed

4 files changed

+350
-0
lines changed

COPYRIGHT

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The Help ToolKit for Motif(TM) and all its supporting programs and
2+
documentation are
3+
4+
Copyright (c) 1997-2000, 2019 Robert S. Werner (a.k.a Akiva Werner)
5+
All Rights Reserved.
6+
7+
License: The MIT License (MIT)

INSTALLATION

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Help ToolKit for Motif Build and Installation Instructions
2+
3+
Building the library
4+
--------------------
5+
The Help ToolKit for Motif(tm) is distributed as ANSI C source code and must
6+
be compiled on your system. Imake is used to attempt to provide a portable
7+
build mechanism. If the imake installation on your system is incorrect or
8+
omitted, then you will need to manually build the components.
9+
10+
Configuring the build
11+
---------------------
12+
The file XscHelp.tmpl is used to configure the build. You should examine is
13+
carefully and make any appropriate changes before building the library.
14+
15+
Creating the makefiles
16+
----------------------
17+
Once the XscHelp.tmpl file has been examined and/or modified, you can build
18+
the distribution with the following commands:
19+
20+
xmkmf
21+
make World
22+
23+
This will build the product and any example programs included in the
24+
distribution. If you want to capture the build output, use the following
25+
commands instead:
26+
27+
xmkmf
28+
make World >& makelog &
29+
tail -f makelog
30+
31+
If the xmkmf script is not installed on your system, replace it with the
32+
following command:
33+
34+
imake -DuseInstalled -I/usr/lib/X11/config
35+
36+
If you do not have imake installed on your system, then the product will
37+
need to be built manually.
38+
39+
Installing the product
40+
----------------------
41+
Once the product has been built, you can install the library, header files,
42+
example programs, and the XscHelp.tmpl file by typing the following command
43+
in the top level product directory:
44+
45+
make -k install
46+
47+
If you only want to install the libraries and header files, change directories
48+
to the 'source' directory and type the "make install" command there.
49+
50+
The libraries and header files are installed in the directories specified by
51+
the XSCHELP_LIBDIR and XSCHELP_INCDIR variables set in the XscHelp.tmpl file.
52+
Remember that you will need to have superuser access to install the product
53+
in the system directories.
54+
55+
Compiling and linking with the product
56+
--------------------------------------
57+
To compile a program that uses the Help ToolKit for Motif, the compiler must
58+
be able to locate the header files. This will happen automatically if the
59+
header files are installed in the directory /usr/include/Xsc. However, if
60+
it is in another location, such as /usr/X11R6/include/Xsc, then you may have
61+
to specify the location on the compiler command line as shown below:
62+
63+
gcc -c -I/usr/X11R6/include my_prog.c
64+
65+
To link programs with the Help ToolKit for Motif, you need to specify the
66+
desired XscHelp libraries with the -l command line argument. You may also
67+
need to specify the location of the archive files with the -L command line
68+
argument.
69+
70+
The core functions in the product are located in the archive libXscHelp.a.
71+
The optional CDE library, available with the registered version, is called
72+
libXscCdeHelp.a. Your link line, as an example, could look like the following:
73+
74+
gcc -o my_prog my_prog.o -L/usr/X11R6/lib -lXscHelp -lXm -lXt -lX11 -lXext
75+

Imakefile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*---------------------------------------------------------------------------*/
2+
/* Based on the top Imakefile for the Xmt library, written by David Flanagan */
3+
/* Used with permission */
4+
/*---------------------------------------------------------------------------*/
5+
/* modified from the X11R5 toplevel Imakefile */
6+
#ifndef UseInstalled
7+
#define UseInstalled /* always use installed X imake */
8+
#endif
9+
#ifndef XscHelpBuildTree
10+
#define XscHelpBuildTree /* from this Imakefile, always build the tree */
11+
#endif
12+
13+
#include "XscHelp.tmpl"
14+
15+
#define IHaveSubdirs
16+
#define PassCDebugFlags
17+
18+
WORLDOPTS = -k
19+
SUBDIRS = src examples
20+
21+
MakeSubdirs($(SUBDIRS))
22+
23+
DependSubdirs($(SUBDIRS))
24+
25+
World::
26+
@echo ""
27+
@echo "Building the Help ToolKit for Motif"
28+
@echo ""
29+
@echo "#####################################"
30+
@echo "# Did you remember to check and set #"
31+
@echo "# the variables in ./XscHelp.tmpl? #"
32+
@echo "#####################################"
33+
@echo ""
34+
@date
35+
@echo ""
36+
-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
37+
$(MAKE) $(MFLAGS) -f Makefile.bak Makefile
38+
$(MAKE) $(MFLAGS) Makefiles
39+
$(MAKE) $(MFLAGS) clean
40+
$(MAKE) $(MFLAGS) includes
41+
$(MAKE) $(MFLAGS) depend
42+
$(MAKE) $(MFLAGS) $(WORLDOPTS)
43+
@echo ""
44+
@date
45+
@echo ""
46+
@echo "Full build of the Help ToolKit for Motif complete."
47+
@echo ""
48+
49+
Everything::
50+
@echo ""
51+
@echo "Rebuilding the Help ToolKit for Motif"
52+
@echo ""
53+
@date
54+
@echo ""
55+
-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
56+
$(MAKE) $(MFLAGS) -f Makefile.bak Makefile
57+
$(MAKE) $(MFLAGS) Makefiles
58+
$(MAKE) $(MFLAGS) includes
59+
$(MAKE) $(MFLAGS) depend
60+
$(MAKE) $(MFLAGS) $(WORLDOPTS)
61+
@echo ""
62+
@date
63+
@echo ""
64+
@echo "Rebuild of the Help ToolKit for Motif complete."
65+
@echo ""
66+
67+
/*
68+
* target to install XscHelp.tmpl in /usr/lib/X11/config
69+
*/
70+
InstallNonExec(XscHelp.tmpl, $(IRULESRC))

XscHelp.tmpl

+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
/*---------------------------------------------------------------------*/
2+
/* Based on the Xmt.tmpl in the Xmt library, written by David Flanagan */
3+
/* Used with permission */
4+
/*---------------------------------------------------------------------*/
5+
/*
6+
** Please read the comments below, and follow the directions they give.
7+
** They explain how to tailor the Help Toolkit build to work correctly at your
8+
** site, and also how to compile in workarounds for certain bugs that
9+
** appear on particular platforms. If you find bugs in the Help ToolKit once
10+
** you've compiled it, you may want to come back to this file to see if there
11+
** is a workaround for the but that you can enable, and recompile.
12+
*/
13+
14+
/*
15+
* These variables control the types of library that will be built.
16+
* Set them as appropriate.
17+
*/
18+
#define DoNormalLib YES
19+
#define DoSharedLib NO
20+
#define DoDebugLib NO
21+
#define DoProfileLib NO
22+
23+
24+
/*
25+
* Specify the type of external library support to build into XscHelp.
26+
* You must have CDE include files and libraries to build with CDE
27+
* support. You _must_ have Motif to build the XscHelp Library.
28+
*/
29+
#define XscHelpUseCDE NO
30+
31+
/*
32+
* These variables specify where the XscHelp library and header
33+
* files will be installed. Change them if you want.
34+
* If you want to use subdirectories of your home directory, remember
35+
* that you can't use the c-shell '~' syntax here; you must use the
36+
* complete pathname of your home directory.
37+
*
38+
* The Imakefile in the clients directory will attempt to install
39+
* client programs in the standard X11 directory (/usr/bin/X11,
40+
* /usr/local/X11R5/bin/X11, or something like that.) If you want
41+
* them somewhere else, just put them there by hand.
42+
*/
43+
XSCHELP_LIBDIR = /usr/X11R6/lib
44+
XSCHELP_INCDIR = /usr/X11R6/include
45+
46+
/*
47+
* These variables specify where the compiler should look for your
48+
* installed Motif and Xt libraries and header files. Specify
49+
* the location of your CDE, Motif and X libraries or header
50+
* using the -L or -I compiler flag, as appropriate.
51+
*
52+
* (I could figure this information out from the Motif and X template
53+
* files, but not all sites have those templates installed properly,
54+
* so XscHelp requires that you explicitly specify the information here.)
55+
*/
56+
XSCHELP_XTLIB = -L/usr/X11R6/lib
57+
XSCHELP_XTINC = -I/usr/X11R6/include
58+
XSCHELP_XMLIB = -L/usr/X11R6/lib
59+
XSCHELP_XMINC = -I/usr/X11R6/include
60+
XSCHELP_DTLIB = -L/usr/dt/lib
61+
XSCHELP_DTINC = -I/usr/dt/include
62+
63+
/*
64+
* These variables specify the names of the various libraries
65+
* that a XscHelp application links against. These are the standard
66+
* names, but you can change them if you want to use a library
67+
* installed with a non-standard name, like Xm1.1, or XtR4, for example.
68+
* The only thing these affect is the definition of XscHelpLibs below.
69+
*/
70+
#define XscHelpLib -lXscHelp
71+
#define XscHelpDtLib -lXscCdeHelp -lDtHelp -lDtSvc -lslang
72+
#define XscHelpXmLib -lXm
73+
#define XscHelpXtLib -lXt
74+
#define XscHelpXLib -lX11
75+
76+
/*
77+
* Define this variable if you need to use extra libraries when linking
78+
* with Motif. Some platforms have to link with libPW.a, for example
79+
* to get the regexp() functions.
80+
*/
81+
XSCHELP_EXTRALIBS = /* eg: -lPW */
82+
83+
84+
/*
85+
* If you don't like the compiler or compiler options imake uses by
86+
* default, you can set a different compiler here. Uncomment the line
87+
* below and set the compiler you want. It is probably safest, though
88+
* to use whatever compiler and options you get by default.
89+
*
90+
* Note: setting this variable will probably only work if you have X11R5
91+
* and are not building a shared library.
92+
*/
93+
/* #define XscHelpCcCmd gcc -ansi */
94+
95+
/*
96+
* Don't set this variable unless you are modifying the source code
97+
*/
98+
#define XscHelpSharedLibraryRevision 1.0
99+
100+
/*
101+
* ======================================================================
102+
* Don't change anything below this line
103+
* ======================================================================
104+
*/
105+
106+
/*
107+
* Define all the required libraries
108+
*/
109+
XSCHELP_LIB = XscHelpLib
110+
111+
#if XscHelpUseCDE
112+
DTLIB = XscHelpDtLib
113+
DTFLAGS = -DUSE_CDE
114+
#else
115+
DTLIB =
116+
DTFLAGS =
117+
#endif
118+
XMLIB = XscHelpXmLib
119+
XTLIB = XscHelpXtLib
120+
XLIB = XscHelpXLib
121+
122+
/*
123+
* You can (should) use this variable when you are writing Imakefiles that
124+
* include this template file. If you are using a non-standard version of
125+
* one or more libs, you can use the individual library variables directly.
126+
*/
127+
#define XscHelpLibs $(XSCHELP_LIB) $(DTLIB) $(XMLIB) $(XTLIB) $(XLIB) $(XSCHELP_EXTRALIBS)
128+
129+
/* don't use tabs to define make variables, as some CPPs won't strip them */
130+
#ifdef XscHelpCcCmd
131+
#undef CcCmd
132+
#define CcCmd XscHelpCcCmd
133+
CC = XscHelpCcCmd
134+
#endif
135+
136+
/*
137+
* When compiling a file, the following variables are used in the build:
138+
* $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
139+
*
140+
* INCLUDES should be set in a specific Imakefile for per-client
141+
* or per-library inclues. We don't set it here.
142+
* EXTRA_INCLUDES will be used for the XscHelp header files, and is set
143+
* depending on the UseInstalled variable, to build within the tree
144+
* or outside of the tree.
145+
* TOP_INCLUDES will be used for Motif and X header files. We always use
146+
* the installed headers, regardless of UseInstalled, but we do check
147+
* to see if they are installed somewhere other than /usr/include
148+
* STD_INCLUDES is for system-specific headers, set in the .cf file.
149+
* we don't mess with it here.
150+
*/
151+
TOP_INCLUDES = $(XSCHELP_DTINC) $(XSCHELP_XMINC) $(XSCHELP_XTINC)
152+
153+
#ifndef XscHelpBuildTree
154+
#if defined(XscHelpIncDir)
155+
EXTRA_INCLUDES = -I$(XSCHELP_INCDIR)
156+
#endif
157+
#else
158+
EXTRA_INCLUDES = -I$(TOP)/include
159+
#endif
160+
161+
/*
162+
* do pretty much the same thing for the library path. Again,
163+
* we assume that X and Motif are installed
164+
*/
165+
#ifndef XscHelpBuildTree
166+
LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(XSCHELP_LIBDIR) $(XSCHELP_DTLIB) $(XSCHELP_XMLIB) $(XSCHELP_XTLIB)
167+
#else
168+
LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(TOP)/src/cde -L$(TOP)/src/base $(XSCHELP_DTLIB) $(XSCHELP_XMLIB) $(XSCHELP_XTLIB)
169+
#endif
170+
171+
/*
172+
* The XscHelpBuildTree variable says that this build is done relative to
173+
* the XscHelp tree, not installed XscHelp. When set, we must propagate this
174+
* flag to any subdirs
175+
*/
176+
#ifdef XscHelpBuildTree
177+
IMAKE_CMD = imake -DUseInstalled -DXscHelpBuildTree -I$(IRULESRC)
178+
#endif
179+
180+
/*
181+
* defines to be passed to the compiler are a lot like include paths:
182+
* SYS_DEFINES for the .cf file
183+
* DEFINES for the Imakefile itself, but we'll use it here.
184+
*
185+
* If there are any general defines we need to pass to any XscHelp source
186+
* file or client, we'll set them here.
187+
*/
188+
DEFINES = $(DTFLAGS)
189+
190+
191+
/*
192+
* The following are some things used in the Imakefiles for XscHelp
193+
* that were added to the imake system in X11R5. We define them
194+
* here if needed, so that XscHelp will build with X11R4 imake config files.
195+
*/
196+
#ifndef XCOMM
197+
#define XCOMM #
198+
#endif

0 commit comments

Comments
 (0)