Paul Kienzle wrote:
On Jun 11, 2007, at 11:51 AM, David Bateman wrote:
Here's a suggestion: you could write a generic configure script (not
generated by autoconf) and Makefile which call the octave package
manager to do the work. These could be inserted automatically by the
pkg dist command. This would also work for bundles of packages.
Having these files means that the sysadmin who doesn't know the
details of Octave but still needs to support her users can write:
./configure; make; make install
as usual and have everything just work (after resolving dependencies).
Paul,
The configure and make steps of this would be simple and could look
something like
if [ -e src/configure ]; then
cat << EOF > configure
cd src
./configure $*
EOF
fi
cat << EOF > Makefile
all:
make -C src
EOF
in the top directory of the package.. However, the question is then
how to install such a prebuilt package, which might get a little
messy. Not impossible though. It might look something like
install:
@if [ -d src ]; then \
if [ -e src/FILES ]; then \
files=`cat FILES`; \
else \
files=`ls *.mex *.oct`; \
fi; \
if [ ! -d ../inst ]; then \
mkdir ../inst; \
fi; \
for file in $$files; do \
cp $$file ../inst; \
done; \
cd ../; \
rm -fr src; \
fi; \
package=`pwd | sed -e 's|^.*/||'`; \
tar czCf ../ /tmp/$$package.tar.gz $$package; \
octave -H -q --no-site-file --eval
"warning('off','all');pkg('install','-global','/tmp/
$$package.tar.gz')"; \
rm /tmp/$$package.tar.gz
Thomas if the octave-forge packages, contained such a configure and
makefile, so that you could do "./configure; make; make install" on
them, that would keep you happy? This would be relatively trivial to
add to the packages..
I don't think we should make this a requirement for all Octave
packages however, as it means that the arbitrary user needs to do
additional work.