[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-crypto] Makefile
From: |
Olivier LF |
Subject: |
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" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conftest.sh
fi
I rely on this in my autoconf/automake example for gnu-crypto.
However...
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?
Olivier
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 .
/home/olivier/program/cvs/classpathx/crypto/source/gnu/crypto/cipher/Anubis.java
...
...
make all-am
make[2]: Entering directory `/home/olivier/tmp/crypt/source'
source='gnu/crypto/cipher/Anubis.java' object='gnu/crypto/cipher/Anubis.lo'
libtool=yes \
depfile='.deps/gnu/crypto/cipher/Anubis.Plo'
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/Anubis.java || echo
'/home/olivier/program/cvs/classpathx/crypto/source/'`gnu/crypto/cipher/Anubis.java
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
/home/olivier/program/cvs/classpathx/crypto/source/gnu/crypto/cipher/Anubis.java
-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
/home/olivier/program/cvs/classpathx/crypto/source/gnu/crypto/cipher/Anubis.java
-MT gnu/crypto/cipher/Anubis.lo -MD -MP -MF
.deps/gnu/crypto/cipher/Anubis.TPlo -o gnu/crypto/cipher/Anubis.o >/dev/null
2>&1
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
lib-gnu-crypto.la -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/lib-gnu-crypto.la .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,lib-gnu-crypto.so.1 -o .libs/lib-gnu-crypto.so.1.0.0
(cd .libs && rm -f lib-gnu-crypto.so.1 && ln -s lib-gnu-crypto.so.1.0.0
lib-gnu-crypto.so.1)
(cd .libs && rm -f lib-gnu-crypto.so && ln -s lib-gnu-crypto.so.1.0.0
lib-gnu-crypto.so)
ar cru .libs/lib-gnu-crypto.a gnu/crypto/cipher/Anubis.o
gnu/crypto/cipher/BaseCipher.o ... ... ... ...
ranlib .libs/lib-gnu-crypto.a
creating lib-gnu-crypto.la
(cd .libs && rm -f lib-gnu-crypto.la && ln -s ../lib-gnu-crypto.la
lib-gnu-crypto.la)
--
----------------------------------------------------------------------
Olivier Louchart-Fletcher
Email: address@hidden