File: README.os2

package info (click to toggle)
swi-prolog 5.6.58-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 73,288 kB
  • ctags: 42,973
  • sloc: ansic: 273,575; perl: 193,068; cpp: 8,361; sh: 5,329; java: 5,136; makefile: 5,048; yacc: 843; xml: 77; csh: 16; awk: 14; sed: 12
file content (149 lines) | stat: -rw-r--r-- 6,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149


        Dear OS/2 2.0 User!
        Thank you for reading this file FIRST.


OS/2 2.0 Port README by Andreas T"onne. 4.2.1992

Purpose:

This file explains how to compile and install the OS/2 port of SWI-Prolog.
Read this file carefully, especially the requirements section below. Also
read the original README and the LICENCE agreement. When in doubt ask the
author of this port. Also check out the differences section at the end of
this document.

Author:

Andreas T"onne
Max-Planck-Institut f"ur Informatik
Im Stadtwald
6600 Saarbr"ucken     (new ZIP in summer!)
Germany

e-mail: atoenne@mpi-sb.mpg.de

Copyright:

The original copyright restrictions for SWI-Prolog apply to this version as
well. See the document LICENCE. I'd like to emphasize that there is no
copyright or copyleft for my work in this port but a COPYOBLIGATION.
No parts of my port may be distributed or utilized separately from the
full distribution copy of SWI-Prolog. :-)

Requirements:

OS/2 2.0 or higher, HPFS file-system, 12MB free diskspace.

Currently this port requires the following software to compile successfully.
- the full EMX software development environment including
-- GCC 2.2.2 or higher
-- emx libraries version 0.8e or higher
-- emx Unix(TM) support (include, libraries, tools)
- GNU make
- GNU sed
- Unix(TM) compatible version of rm.exe and cp.exe

This software is available for free on the Internet or from public-domain
software services. Do not ask the author for a copy.


Compiling  & Installation:

When you are installing the binary distribution look at 4. and 5a.

1. Setting up the directories

Do not try to run the 'setup' script. Is is a Unix(tm) shell script anyway.
Change to the SWI directory 'pl', create a new directory named 'OS2' and copy
every file from the directory 'src' to the new directory 'OS2'. You do not
need the 'gnu' subdirectory of 'src'. Change to the directory 'OS2' and 
copy 'md-os2.h' to 'md.h'. You are now ready for compilation.

2. Adaption of the Makefile

The official Makefile assumes that your compiler is named cc. Most of these
assumptions are taken care of during the creation of xmakefile. You have
to change in the file 'Makefile' the definition for 
          CPP= cc -E 
to 
          CPP= gcc -E 
however. See the header section of your 'Makefile'. Probably you want to 
edit the file 'pl/config.h' as well. Here you may specify the paths for
the SWI-Prolog home. Please follow the comments carefully. Especially note
that you have to specify almost every path twice. Once for the Prolog internal
path which is similiar to a Unix(tm) path. And the second time for OS/2 tools
that do not know how to handle Unix(tm) filenames.
Furthermore you may now edit the top-section of 'pl/OS2/md.h'. Do not fiddle
with the remaining switches unless you really know what you are doing.
This port is approved for the current switches only!

3. Run the statement 'make' in 'pl/OS2'. This will first create a new
makefile named 'xmakefile' that is adapted for your environment. This
process needs 'sed.exe', 'cmd.exe' and 'gcc.exe'. Next make calls
itself recursively with the new makefile. A binary called 'pl.exe' is created
and the initial startup state is computed.

4.Check your environment for the following variables:
- HOME		an OS/2 path to your working directory. Default is \
- TMP		an OS/2 path to a directory for temporary files.
- PATH		a ; separated list of OS/2 paths. Add the new 'bin'-directory.
- LIBPATH	like PATH but points to the places where dynamic-linked 
		libraries are stored. The EMX runtime module 'emx.dll' must
		be accessible through LIBPATH.
- TERMCAP 	OS/2 path to your termcap.dat. This file is part of the EMX
		development system.The binary distribution includes a copy
		which resides in a directory 'etc'.
- SWI_HOME_DIR	the OS/2 path of your SWI-Prolog directory. The default path is
		'C:\usr\public\swi'.

ls
5. The installation from sources is performed by the statement
	make install
in 'pl\OS2'. Normally this creates the following:
$(M_SYSTEMDIR)
$(M_SYSTEMDIR)\bin
$(M_SYSTEMDIR)\bin\pl-bite.exe
$(M_SYSTEMDIR)\bin\pl.cmd		Self-starting initial state
$(M_SYSTEMDIR)\runtime
$(M_SYSTEMDIR)\runtime\PC
$(M_SYSTEMDIR)\runtime\PC\pl.exe	The real executable. Do not move it!
$(M_SYSTEMDIR)\library			A copy of 'pl/library'
$(M_SYSTEMDIR)\startup\startup.PC	Boot-start
This may vary for different setting of $(M_PROLOG), $(M_SYS) and $(M_BINDIR).

5a. The installation from binaries is performed by copying the uncompressed
binaries to a proper place on a HPFS volume. Make sure that the directories
stay in place (see above). The binary distribution includes an extra directory
'etc' with a termcap-definition file 'termcap.dat'. The same directory includes
a copy of the EMX runtime module 'emx.dll'. Copy this to a place in your
LIBPATH. Next change to the root of the SWI tree and execute 'dump.cmd'.
This will create a initial saved state as 'bin\pl.cmd'. 


***************************************************************************
Differences to the Unix(tm) version:

- filenames are automatically converted from OS/2 HPFS style to an internal
  Unix(tm) compatible form and vice versa. Backslash is converted to slash and
  drive letters X: are converted to /X:/. Case is preserved. Only the internal
  form of filenames is available from inside SWI-Prolog.
  OS/2 filenames are understood by many predicates but their use is
  discouraged.
- the environment variable CANONICAL_PATHS is not needed. HPFS does not support
  links or join/subst/assign like DOS and thus absolute paths are unique.
- filename completion expands any pattern '~Username' to the value of the
  HOME environment variable or to '/'.
- access_file/2 always suceeds for execute.
- same_file/2 only checks for same names.
- no profiling primitives. Do not even think of it!
- no foreign language interface. This may be changed in the future.

***************************************************************************
Bugs:

- filename conversions assume HPFS.
- open_null_stream is not yet supports. Reason? The creation of ATOMS is
  too inflexible. We need to change the name of /dev/null to /dev/nul
  for EMX.