Skip to content

Commit

Permalink
Import v2.0.18-32bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ilin committed Jul 21, 2011
0 parents commit 23f3f8a
Show file tree
Hide file tree
Showing 3,251 changed files with 356,660 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ENV.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OOC_DEV_ROOT="@OOC_DEV_ROOT@"
export OOC_DEV_ROOT
MAIN_MAKEFILE="$OOC_DEV_ROOT/rsrc/OOC/Makefile.ooc-main"
export MAIN_MAKEFILE
#OO2CRC="$OOC_DEV_ROOT/oo2crc-install.xml"
#export OO2CRC
142 changes: 142 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
The installation package comes in two different version, oo2c_32 and
oo2c_64. The first is for targets with a pointer size of 4 bytes,
like ix86 CPUs, the other for the ones with 8 bytes per pointer, like
Alpha CPUs. Pick the one matching the platform you are using.

Requirements:

GNU C compiler gcc (2.95 or later, but there are reports of
installation failures with 3.2.x)
GNU make

Additional requirements for "make test":

GNU tar
perl
xsltproc (from the GNOME XML library)


Optional Packages
=================

oo2c can utilize two add-on packages: Hans-J. Boehm's conservative
garbage collector and GNU libtool (for support of static and shared
libraries). It is highly recommended to use the garbage collector.

1. The Boehm Garbage Collector

The gc can be found at

http://www.hpl.hp.com/personal/Hans_Boehm/gc/

At the time of writing, gc6.1 is current. For instructions on how
to install the gc, please refer its README file.

To use the gc, configure must be able to link against it with -lgc,
and the include file gc/gc.h. Both must work, or the garbage
collector will not be used. If necessary, pass CPPFLAGS and
LDFLAGS explicitly to configure, like this:

env CPPFLAGS=-I/foo/gc/include LDFLAGS=-L/foo/gc/lib ./configure

Without a garbage collector, process size during installation
typically exceeds 150MB. If it aborts with an out of memory error,
the compiler can still be installed simply be restarting the
process as often as necessary. Please note that in this case no
application build with the compiler will garbage collect any heap
objects.

2. GNU libtool

libtool can be obtained from any GNU server, e.g.

ftp://ftp.gnu.org/pub/gnu/libtool/

At the time of writing, libtool 1.4.3 is current. Follow the
directions in the tar to install libtool.

oo2c's installation process will detect libtool. It will be used
to create a static and, possibly, shared library with the OOC
standard modules.

Basic Installation
==================

The simplest way to compile this package is:
[check file PROBLEMS if it turns out to be not that simple]

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Type `make install' to install the programs and any data files and
documentation. `make install-strip' will additionally remove any
debug information from the installed executables.

4. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'.

Compilers and Options
=====================

Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure

With `--enable-threads=pthreads', the compiler is installed with
support for the POSIX threads library. For this to work, the garbage
collector must be installed with threading support as well.

Installation Names
==================

By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.

You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.

In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.

Operation Controls
==================

`configure' recognizes the following options to control how it
operates.

`--help'
Print a summary of the options to `configure', and exit.

`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.

`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.

`configure' also accepts some other, not widely useful, options.
186 changes: 186 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# NOTE: To use this makefile in a development setup, the environment
# variables OOC_DEV_ROOT and MAIN_MAKEFILE must be set. This is
# easiest done by cd-ing to the top-level directory of the project and
# sourcing the file ENV there: `. ENV' (this assumes a Bourne
# compatible shell).
#
# In an installation setup, simply run "./configure" and do "make
# install". In this case, OOC_DEV_ROOT must not be set.

ifndef OOC_DEV_ROOT
export OOC_DEV_ROOT=$(shell pwd)
export MAIN_MAKEFILE=$(OOC_DEV_ROOT)/rsrc/OOC/Makefile.ooc-main
endif

include $(OOC_DEV_ROOT)/Makefile.config

# When build from a distribution tarball, then the bootstrap compiler is
# the one build from the C sources in the tarball. To be able to run
# "make install" directly from the development environment, this variable
# must point to an existing compiler executable.
BOOTSTRAP_COMPILER?=stage0/oo2c

# TEST_SUBDIRS: List of subdirectories with testcases.
TEST_SUBDIRS=\
$(addprefix tests/config/,sections cmdline environment simple) \
tests/scanner \
tests/parser \
tests/symtab \
tests/interface \
tests/oberon-doc \
tests/h2o \
tests/compile \
tests/ssa \
tests/lib \
tests/ia32 \
tests/ssa-c-output \

top_builddir=$(OOC_DEV_ROOT)

test_programs=TestScanner TestParser TestSymTab TestConfigSections TestConfigCmdLine TestConfigEnv TestConfigSimple TestInterfaceGen TestTexinfo TestCompile TestH2O TestWebServer TestCodec encdec AllModules RunTests

all: lib/obj/liboo2c.la bin/oo2c

.PHONY: clean distclean test main-clean oo2c install intall-strip

### `clean'
### Delete all files from the current directory that are normally
### created by building the program. Don't delete the files that
### record the configuration. Also preserve files that could be made
### by building, but normally aren't because the distribution comes
### with them.
main-clean: test-cleanall
for i in sym obj bin oocdoc; do rm -Rf ${top_builddir}/$$i; done
for i in lib/sym lib/obj lib/bin lib/oocdoc; do rm -Rf ${top_builddir}/$$i; done
rm -f src/XML oo2c
for i in ${test_programs}; do rm -f $$i; done
-${MAKE} -C stage0 -f Makefile.ext clean
rm -Rf stage1 stage2 tests/lib-TestCompile tests/lib-oo2c gmon.out
${MAKE} -C tests/hostess-ooc1 test-clean
${MAKE} -C tests/benchmark clean

### `distclean'
### Delete all files from the current directory that are created by
### configuring or building the program. If you have unpacked the
### source and built the program without creating any other files,
### `make distclean' should leave only the files that were in the
### distribution.
distclean: main-clean
rm -f ENV Makefile.config rsrc/OOC/oo2crc.xml rsrc/OOC/oo2crc.xml.mk oo2crc-install.xml lib/pkginfo.xml rsrc/OOC/TestFramework/config.xml rsrc/OOC/oobacktrace src/OOC/Config/Autoconf.Mod
rm -f lib/src/__config.h config.log config.status config.status64
rm -Rf autom4te.cache stage0/bin bin

### `cvs-clean'
### Delete everything that should not appear in the CVS.
cvsclean: distclean
rm -Rf stage0

FRC:


test-hostess-ooc1:
${MAKE} -C tests/hostess-ooc1 test-runall



### Create header file that is used as input for GNU autoconf.
lib/src/__config.h.in: configure.ac aclocal.m4
autoheader

### Create configure script using GNU autoconf.
configure: configure.ac aclocal.m4 lib/src/__config.h.in
autoconf

### Some variables are defined recursively by configure. Expanding these
### variables is best done by the make utility itself. This rule puts the
### expanded values into the OOC configuration file oo2crc.xml.
$(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml: $(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml.mk $(OOC_DEV_ROOT)/Makefile.config
sed -e 's?%libdir%?$(libdir)?g' \
-e 's?%oocdir%?$(oocdir)?g' \
-e 's?%bindir%?$(bindir)?g' \
-e 's?%INSTALL%?$(INSTALL)?g' \
-e 's?%INSTALL_PROGRAM%?$(INSTALL_PROGRAM)?g' \
-e 's?%INSTALL_DATA%?$(INSTALL_DATA)?g' \
$(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml.mk >$(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml
rsrc/OOC/oo2crc.xml: $(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml

### This configuration file is used to build and install the compiler and
### library from scratch. It must not refer to any stale data that may
### be present on the target system.
$(OOC_DEV_ROOT)/oo2crc-install.xml: $(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml
sed -e 's:<file-system>:<!--:g' \
-e 's:</file-system>:-->:g' \
-e 's:<repositories>:<repositories><file-system>$(OOC_DEV_ROOT)/lib</file-system><file-system>$(OOC_DEV_ROOT)</file-system>:' \
$(OOC_DEV_ROOT)/rsrc/OOC/oo2crc.xml >$(OOC_DEV_ROOT)/oo2crc-install.xml

config.status: configure
@echo Error: Stale config.status. Please run ./configure and try again.
@/bin/false

dist: $(OOC_DEV_ROOT)/oo2crc-install.xml configure config.status
-$(MKDIR) $(OOC_DEV_ROOT)/sym $(OOC_DEV_ROOT)/obj $(OOC_DEV_ROOT)/bin 2>/dev/null
$(OOC) --config $(OOC_DEV_ROOT)/oo2crc-install.xml --make $(OFLAGS) oo2c
rm -Rf stage0
mkdir stage0 stage0/lib
ln -s ../src stage0/src
ln -s ../../lib/src stage0/lib/src
bin/oo2c --config oo2crc-install.xml --make -r stage0/lib -r stage0 --cc "" $(OFLAGS) stage0/src/oo2c.Mod
rm -Rf stage0/sym/* stage0/lib/sym/*
cd stage0 && $(PERL) $(OOC_DEV_ROOT)/rsrc/OOC/makefilegen.pl >Makefile.ext
${MAKE} distclean
cd .. && rm -f $(DISTDIR) && ln -s ooc2 $(DISTDIR) && tar -c -v --exclude CVS --exclude '*~' --exclude '.#*' -f - $(DISTDIR)/* | bzip2 -9 >$(DISTDIR).tar.bz2 && rm -f $(DISTDIR)

dist64:
sed -e 's:@ooc_target_integer@,[0-9]*:@ooc_target_integer@,64:' \
-e 's:@ooc_target_address@,[0-9]*:@ooc_target_address@,64:' \
-e 's:@ooc_target_address_type@,[a-z]*:@ooc_target_address_type@,hugeint:' \
config.status >config.status64
/bin/sh config.status64
${MAKE} dist DISTDIR=oo2c_64-$(PACKAGE_VERSION)

### Create initial compiler executable from distributed C sources.
stage0/oo2c:
${MAKE} -C stage0 -f Makefile.ext setup-src oo2c

### Build library from core modules using the initial compiler executable.
lib/obj/liboo2c.la: $(BOOTSTRAP_COMPILER) $(OOC_DEV_ROOT)/oo2crc-install.xml
$(BOOTSTRAP_COMPILER) --config oo2crc-install.xml -r lib -r . $(OFLAGS) --build-package liboo2c

### Build second compiler using the initial compiler executable and the
### library lib/obj/liboo2c.la.
bin/oo2c: $(BOOTSTRAP_COMPILER) $(OOC_DEV_ROOT)/oo2crc-install.xml lib/obj/liboo2c.la
$(BOOTSTRAP_COMPILER) --config oo2crc-install.xml -r lib -r . $(OFLAGS) --build-package oo2c

### Remove manual pages.
uninstall-man:
for i in oo2c oob ooef oowhereis; do \
rm -f $(mandir)/$$i$(manext) $(mandir)/$$i$(manext).gz; \
done

### Install manual pages.
install-man: uninstall-man
$(INSTALL) -d $(mandir)
for i in oo2c oob ooef oowhereis; do \
$(INSTALL_DATA) man/$$i.1 $(mandir)/$$i$(manext); \
done

### Install binaries and support files. To place the files into a directory
### different from the targets supplied during configuration, override the
### parameter `prefix'.
install: lib/obj/liboo2c.la bin/oo2c install-man
$(INSTALL) -d $(oocdir)/pkginfo
$(BOOTSTRAP_COMPILER) --config oo2crc-install.xml --bindir "$(bindir)" --libdir "$(libdir)" --oocdir "$(oocdir)" -r lib -r . --install-program "$(INSTALL_PROGRAM)" $(OFLAGS) --install-package liboo2c
$(BOOTSTRAP_COMPILER) --config oo2crc-install.xml --bindir "$(bindir)" --libdir "$(libdir)" --oocdir "$(oocdir)" -r lib -r . --install-program "$(INSTALL_PROGRAM)" $(OFLAGS) --install-package oo2c
$(INSTALL_SCRIPT) rsrc/OOC/oobacktrace $(bindir)/oobacktrace
chmod a+x $(oocdir)/install-sh

install-strip:
${MAKE} INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install

uninstall: uninstall-man FRC
$(BOOTSTRAP_COMPILER) --config oo2crc-install.xml $(OFLAGS) --uninstall-package oo2c liboo2c
rm -f $(bindir)/oobacktrace $(oocdir)/pkginfo.xml

ifdef MAIN_MAKEFILE
include $(MAIN_MAKEFILE)
endif
57 changes: 57 additions & 0 deletions Makefile.config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ==================== Where To Install Things ===========================

# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them. This defaults to /usr/local.
prefix=@prefix@

# Like `prefix', but used for architecture-specific files.
exec_prefix=@exec_prefix@

# Where to install oo2c and other binaries that people will want to
# run directly.
bindir=@bindir@

# Where to install shared and static library files. This directory
# should be in the linker's search path.
libdir=@libdir@

# Where to install other files needed to run oo2c, like symbol files.
oocdir=@libdir@/oo2c

# Where to install oo2c's man pages, and what extension they should have.
mandir=@mandir@/man1
manext=.1

# ==================== Utility Programs for the Build ====================

# Allow the user to specify the install program.
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_SCRIPT=@INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@

# ========================================================================

export OOC=@OOC@
export OOEF=@OOEF@
export DIFF=@DIFF@
export XSLTPROC=@XSLTPROC@
export PERL=@PERL@

export CC=@CC@
export CFLAGS=@CFLAGS@
export CPPFLAGS=@CPPFLAGS@
export LDFLAGS=@LDFLAGS@
export LIBS=@LIBS@

PACKAGE_VERSION=@PACKAGE_VERSION@
DISTDIR=oo2c_32-$(PACKAGE_VERSION)
OFLAGS=@OFLAGS@

PRINT=@echo
MKDIR=mkdir -p -m 755
RM=rm -f
RM_R=rm -Rf
LN_S=ln -s
Loading

0 comments on commit 23f3f8a

Please sign in to comment.