This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
another method
- To: GSL mailing list <gsl-discuss at sourceware dot cygnus dot com>
- Subject: another method
- From: Dave Morrison <dave at bnl dot gov>
- Date: Sat, 29 Jan 2000 18:19:26 -0500
Hi Gerard,
Here's another method for implementing #include "gsl/...". Add the
line:
make DESTDIR=${full_top_builddir}/tmp install-data
_after_ the AC_OUTPUT in configure.in. That way, at configure time, the
header files will be temporarily installed in a directory tree hanging
off the build area. Then, in each Makefile.am, change the INCLUDES (in
the case of the Makefile.am for 'err' you need to add the line) so it
reads
INCLUDES = -I$(full_top_builddir)/tmp$(includedir) ...
and then change the sources so they prefix their includes with "gsl/".
The following "script" implements all these changes:
echo 'make DESTDIR=${full_top_builddir}/tmp install-data' >>
configure.in
find . -name Makefile.am -exec perl -pi.bak -e 's#^(INCLUDES *=
*)#INCLUDES = -I\$(full_top_builddir)/tmp\$(includedir) #' {} \;
find . -name '*.[ch]' -exec perl -pi.bak -e
's#([<"])(gsl_.*\.h)#$1gsl/$2#' {} \;
#
# Add INCLUDES to beginning of err/Makefile.am
#
mv err/Makefile.am err/Makefile.am.bak
echo 'INCLUDES = -I$(full_top_builddir)/tmp$(includedir)' >
err/Makefile.am
cat err/Makefile.am.bak >> err/Makefile.am
#
# Add missing pgkinclude_HEADER files to fft/Makefile.am
#
perl -pi.bak -e 's/(pkginclude.*)/$1 gsl_dft_complex_float.h
gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h
gsl_fft_real_float.h/;' fft/Makefile.am
I just tried this prescription on a copy of gsl freshly checked out from
CVS and everything seemed to work fine.
Cheers,
Dave
--
David Morrison Brookhaven National Laboratory phone: 631-344-5840
Physics Department, Bldg 510 C fax: 631-344-3253
Upton, NY 11973-5000 email: dave@bnl.gov