Waldek Hebisch wrote:
> I fetched a nightly CVS tarball on November 1. When I looked at differences
> is seems that src_x86_Solaris directory is just an obsolete version of
> src_x86_Linux directory. *Both* directories contain full support for
> x86 Linux and x86 Solaris. Solaris directory contains binaries (which
> should not be present in CVS) and appearently lacks few fixes applied to
> x86 version. To build one have to choose (link) correct
> $usepop/src/syscomp/sysdefs.p file. The rest is handled by conditional
> compilation.
I wonder if anyone is using the x86 Solaris version of poplog? I don't
think it was ever part of the main source tree at Sussex, and was
put together at sussex as a special favour for one or two users.
The only version of this in the Bham Poplog directory is
http://www.cs.bham.ac.uk/research/poplog/new/pcsolaris1552.tar.gz
12580609 bytes Aug 30 1999
It is not included in
http://www.cs.bham.ac.uk/research/poplog/src/master
but the vast majority of the sources will actually be in the
S.pcunix/
directory, which includes also linux sources.
> I belive that many OS variations can be handled in similar way, and
> the harder ones needs OS specific directory (for symmetry we can
> make OS specific directories for all OS-es). I think that thare is
> no need to have files which are both CPU and OS specific.
I have been thinking about this. Instead of the hard links that we
currently have, in the source tree, which easily cause mistakes (e.g. if
a file is renamed and then a replacement inserted), I suggest we have a
source tree that is shared by all versions. All files that are common to
all versions of poplog will be in the usual locations.
Every file that is EITHER CPU-specific or OS specific will be in a
subdirectory with the name of the CPU or the OS, prefixed by 'CPU-'
ir 'OS-', e.g. 'OS-Solaris'
Versions of the same OS should be handled by conditional computation.
Some 'psuedo' OSes may have to be invented, e.g. 'OS-unix' could cover
stuff for all versions of linux and unix with conditional-compilation
where appropriate.
I presume that for this purpose we'd have to treat cygwin as an OS ?
This means that no files need to have a special file name with extra
suffixes, which could cause problems on some operating systems with
limited-length file names.
If there are any files that are both CPU and OS specific (e.g. if some
of the assembler files for a particular CPU take different versions for
different operating systems, in a manner that cannot be handled by
conditional compilation mechanisms), then the OS versions will be in
subdirectories of the CPU versions.
Then, to create complete system for a particular OS+CPU combination, a
script will copy over the contents of the whole tree except that
where directory names specify any other OS or CPU their contents
will be ignored as irrelevent and the contents of relevant
directories will be installed as if they were in the nearest
non-OS and non-CPU specific super-directory.
I think this method is simpler than having to do truncation of file
names: instead it uses truncation of path names. But I won't know for
sure that this is simpler till it's tried.
Another option would be to keep the files in the sub-directory where
they are installed, and merely insert symbolic links to them. E.g.
cd <path>
ln -s <CPU-type>/* .
(then remove new links that refer to a directory)
ln -s <CPU-type>/<OS-type>* .
Finally
ln -s <OS-type>/* .
If the linking method is used, then no file name or path name ever needs
to be changed when building a package, only links inserted. I don't know
if that will work on windows.
This also solves the problem of testers having to work with one file,
and then installing another file.
The developers will work in a system that has files in the right places,
but with extra symbolic links.
When installing something into sourceforge only the file not the
link will be installed.
> I want to make my point once more: there should be _NO_ duplication
> in the source tree. With unified source tree a little effort is
> enough to support many variants. Duplication means duplicated effort.
Agreed. The above scheme avoids most duplication.
Aaron
|