[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-discuss] Re: [Classpathx-crypto] Makefile

From: Olivier LF
Subject: [Classpathx-discuss] Re: [Classpathx-crypto] Makefile
Date: Mon, 17 Dec 2001 23:16:31 +1100
User-agent: Mutt/1.3.23i

On Mon, Dec 17, 2001 at 06:54:40PM +1100, Raif S. Naffah wrote:
> At 11:41 PM 12/16/01 +0000, Nic Ferrier wrote:
> >However, I did solve the central portability problem of my original
> >makefile: the path separator used (I had hard coded ':').
> >
> >I've solved it by using a functional system (the GNU Make @(call)
> >construct allows a certain amount of functionalism).
> # a workaround to allow using the same Makefile under both Unix and NT
> ifeq (${OS},Windows_NT)
>         PS:=;
> else
>         PS:=:
> endif

Autoconf seems to take care of that. This is the code generated in the 
configure script:

# Rewrite early, but we need PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! $SHELL" >
  echo  "exit 0"   >>
  chmod +x
  if (PATH=".;."; >/dev/null 2>&1; then
  rm -f

I rely on this in my autoconf/automake example for gnu-crypto.
apparantly it doesn't work on cygwin. I suspect it is because I also
have to add double quotes all over the place, something like:

   jikes -classpath "address@hidden@pkg2" ...

to prevent the shell from resolving the semicolon as the "end of
command" character. It used to work on cygwin but I haven't try it for
few weeks.

However going back to the earlier Makefile discussion, I've cut and paste 
portions of the make process generated by automake/autoconf scripts for 
GCJ compilation and shared libraries. As you can see, it is not exactly 
trivial or intuitive. 
Do you really want to reinvent all of that while automake, a GNU tool 
Copyrighted by the FSF, is out there?


Making all in source
make[1]: Entering directory `/home/olivier/tmp/crypt/source'
gcj -C --encoding=UTF-8 
-fCLASSPATH=/home/olivier/program/cvs/classpathx/crypto/source -d . 
make  all-am
make[2]: Entering directory `/home/olivier/tmp/crypt/source'
source='gnu/crypto/cipher/' object='gnu/crypto/cipher/Anubis.lo' 
libtool=yes \
tmpdepfile='.deps/gnu/crypto/cipher/Anubis.TPlo' \
depmode=gcc3 /bin/sh /home/olivier/program/cvs/classpathx/crypto/depcomp \
/bin/sh ../libtool --mode=compile gcj --encoding=UTF-8 -fassume-compiled 
-fCLASSPATH=/home/olivier/program/cvs/classpathx/crypto/source -g -O2 -c -o 
gnu/crypto/cipher/Anubis.lo `test -f gnu/crypto/cipher/ || echo 
rm -f gnu/crypto/cipher/.libs/Anubis.lo
gcj --encoding=UTF-8 -fassume-compiled 
-fCLASSPATH=/home/olivier/program/cvs/classpathx/crypto/source -g -O2 -c 
 -MT gnu/crypto/cipher/Anubis.lo -MD -MP -MF 
.deps/gnu/crypto/cipher/Anubis.TPlo  -fPIC  -o gnu/crypto/cipher/Anubis.o
mv -f gnu/crypto/cipher/Anubis.o gnu/crypto/cipher/.libs/Anubis.lo
gcj --encoding=UTF-8 -fassume-compiled 
-fCLASSPATH=/home/olivier/program/cvs/classpathx/crypto/source -g -O2 -c 
 -MT gnu/crypto/cipher/Anubis.lo -MD -MP -MF 
.deps/gnu/crypto/cipher/Anubis.TPlo -o gnu/crypto/cipher/Anubis.o >/dev/null 
mv -f gnu/crypto/cipher/.libs/Anubis.lo gnu/crypto/cipher/Anubis.lo
/bin/sh ../libtool --mode=link gcj --encoding=UTF-8 -fassume-compiled 
-fCLASSPATH=/home/olivier/program/cvs/classpathx/crypto/source -g -O2   -o -rpath /home/olivier/tmp/ooo/lib -version-info 1:0 
gnu/crypto/cipher/Anubis.lo gnu/crypto/cipher/BaseCipher.lo 
gnu/crypto/cipher/CipherFactory.lo gnu/crypto/cipher/IBlockCipher.lo ... ... 
... ...
mkdir .libs
rm -fr .libs/ .libs/lib-gnu-crypto.* .libs/lib-gnu-crypto.*
gcc -shared  gnu/crypto/cipher/Anubis.lo gnu/crypto/cipher/BaseCipher.lo 
gnu/crypto/cipher/CipherFactory.lo ... ... ... ...  -lc  -Wl,-soname 
-Wl, -o .libs/
(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s
ar cru .libs/lib-gnu-crypto.a  gnu/crypto/cipher/Anubis.o 
gnu/crypto/cipher/BaseCipher.o ... ... ... ...
ranlib .libs/lib-gnu-crypto.a
(cd .libs && rm -f && ln -s ../

Olivier Louchart-Fletcher
Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]