gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [task #13765] Convert static libraries to shared librar


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [task #13765] Convert static libraries to shared libraries
Date: Sun, 29 May 2016 12:22:27 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Update of task #13765 (project gnuastro):

        Percent Complete:                     10% => 30%                    

    _______________________________________________________

Follow-up Comment #12:

The "refactor" branch was merged into master and is now on the main
repository. Thank you very much for the hard work.

I had initially decided to leave the merging of this branch into master after
the 0.1 release. However, I recognized that any further modifications to the
file/function names (as mentioned in the previous comment) can also be done
after the merge! My mind was too focused on all the other more important
aspects at that time. Infact changing the names would be easier because of the
prefixes. For the time being all these changes are internal, and the libraries
aren't installed, so they don't need to be documented in the manual as library
functions. Finally, if this standard is included in the 0.1 release of
Gnuastro, interested developers will start using it from the beginning and
there will be less friction later.

The standard place to install the header files is Automake's
'$(pkgincludedir)', which is `$(includedir)/$(PACKAGE)', where $(PACKAGE) is
`gnuastro'. So to be standard, the directory where all the headers should be
kept must be named `gnuastro'. In order to make the utility source codes
similar to what a user would write in their own programs, all the headers were
moved to the `lib/gnuastro' directory (previously they were in `include/').
Also, the `-I$(top_srcdir)/lib' directory replaced the previous
`-I$(top_srcdir)/include' directory in the `Makefile.am's.

Another issue was that header files depend on each other (for example
`commonargs.h' currently depends on 'checkset.h', 'commonparams.h' and
'fixedstringmacros.h'). After checking, I noticed that GSL's headers also
depend on each other (for example `eigen/gsl_eigen.h' includes
`gsl/gsl_vector.h' and `gsl/gsl_matrix.h'). So if a user does really intend to
not have a `gnuastro' (or 'gsl') directory in their installed 'include/'
directory, programs that include such headers from Gnuastro (or GSL) will not
be able to find the headers and crash. It might be possible to define a
`./configure' option to allow the user to specify a macro to use as directory,
but I feel that would be too much, and would be hardly ever used!

Since that hypothetical situation cannot be used in Gnuastro (or GSL), and
since unlike GSL, we have no technical necessity to have this filename
convention, I decided to remove the prefix for the header file names. The
directory keeping the header file names is also now `gnuastro', so it is very
unlikely to have have an overlap with other packages (at least in file names).
However, the `gal_' prefix for the installed functions, macros and variables
still remains (since `gnuastro_' would be too long! It will also be very clear
and non-cryptic if someone is looking into their `$prefix/include' directory.

After the 0.1 release (in the next day or two), we can now start making the
libraries installable.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?13765>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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