[comp.sys.acorn] Freeze - Arc version - Compiling C programs - a standard ?

maumg@warwick.ac.uk (Pop Mobility Freak) (06/03/91)

I recently recompiled the Unix command freeze for the Arc. It is compress
program which beats compress. I have posted it to the Newcastle info server.

About the program

This is a conversion of the Un*x compression program freeze for the
Archimedes. The manual refers to programs melt and fcat. Infact all the
programs are the same and read the command line to find what action is
required. This works fine on Unix because only one version of the program
need be stored and links made. Because there are flags to do the functions of
melt and fcat anyway these programs are not made.

melt = freeze -d
fcat = freeze -dc

Notes on compilation

To compile the program Paul Moore's Utils are needed and his conversion of
GNU make. These can be obtained from the Newcastle info server. There is a
ready made compiled version which uses CLib 3.66 included.

If you use make install a version will be copied into %.Tar because this is
where I store it for use with tar (via setting the tar$compress and
tar$decomress variables). The destination can be altered by editting the
makefile or using make install BIN=<your destinaton>.

To use tar set tar$compress to freeze < %1 > %2
           and tar$decompress to freeze -d < %1 > %2

A few system variables are used to find the CLib and Utils libraries and
header files. <C$LibRoot> is used to find the CLib and the Utils library is
assumed to be in <C$Loc>.Utils. To alter these locations it would be best to
edit the makefile.

However I believe we ought to come to an unoffical standard about using
operating system variables to locate libraries as everyone will want to store
the libraries in different places. This would prevent names being hardwired
into makefiles. I recomend the ones I have used above as a draft standard.
That is <C$LibRoot> for the CLib and <C$Loc>.<library name> for any others
(for example RiscOsLib and Utils). So how about it? Anyone got any strong
feelings either way to adopting this naming convention as an unofficial
standard? The reason I selected these is they are set during the obey file
CStart provided with C, although C$Loc is unset again (this can easily be
removed).

I offer no guarentee what so every with the program. It may be freely
distributed as long as no charges are made for it whatsoever. I know the
alterations I have made are very cludgy and I should really have removed all
the code to deal with piping but as I am sitting my finals soon could not be
bothered (I only wanted a working version). If anyone else would like to do
the honours and convert it properly feel free.

Have fun,
         PMF

dhmyrdal@lise.unit.no (Dag H}kon Myrdal) (06/03/91)

In article <&+3_98|@warwick.ac.uk> maumg@warwick.ac.uk (Pop Mobility Freak) writes:
[...]
>
>However I believe we ought to come to an unoffical standard about using
>operating system variables to locate libraries as everyone will want to store
>the libraries in different places. This would prevent names being hardwired
>into makefiles. I recomend the ones I have used above as a draft standard.
>That is <C$LibRoot> for the CLib and <C$Loc>.<library name> for any others
>(for example RiscOsLib and Utils). So how about it? Anyone got any strong
>feelings either way to adopting this naming convention as an unofficial
>standard? The reason I selected these is they are set during the obey file
>CStart provided with C, although C$Loc is unset again (this can easily be
>removed).
>

Why don't you use <RUN$Path> for utils? Risc OS looks up all
directories in this path automatically when you want to run an
application or utility. I myself set this in my main !boot file 
to point at *all* places where I store utilities, so that if people 
*dont* fuss about putting paths pointing at various utils in makefiles
everything will be OK!

--Dag

gtoal@castle.ed.ac.uk (G Toal) (06/04/91)

In article <&+3_98|@warwick.ac.uk> maumg@warwick.ac.uk (Pop Mobility Freak) writes:
:However I believe we ought to come to an unoffical standard about using
:operating system variables to locate libraries as everyone will want to store
:the libraries in different places. This would prevent names being hardwired
:into makefiles. I recomend the ones I have used above as a draft standard.
:That is <C$LibRoot> for the CLib and <C$Loc>.<library name> for any others
:(for example RiscOsLib and Utils). So how about it? Anyone got any strong
:feelings either way to adopting this naming convention as an unofficial
:standard?

YES!  Try to uses PATHS wherever possible, to allow > 1 directory to
be examined.  In this particulat case, why not Clib$path as used by both
PMoore's utils and many Acorn makefiles?

Graham

maumg@warwick.ac.uk (Pop Mobility Freak) (06/05/91)

I think using CLib$Path sounds good to me. I shall check that amu and cc
work with lines which use filenames like CLib:fubar

TTFN,
        PMF

gtoal@tardis.computer-science.edinburgh.ac.uk (06/07/91)

In article <1A4_?1|@warwick.ac.uk> maumg@warwick.ac.uk (Pop Mobility Freak) writes:
>I think using CLib$Path sounds good to me. I shall check that amu and cc
>work with lines which use filenames like CLib:fubar
>
>TTFN,
>        PMF


WARNING:  make sure you point clib$path at somewhere containing an o
directory, so you can use  clib:mylib.o  in your CC commands -- otherwise
a future version of cc you don't have will break.  (without the .o
it thinks it is a source and tries to compile it :-( )

G