[Top][All Lists]

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

[gnuastro-commits] master 59e301a: BuildProgram's new la option document

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 59e301a: BuildProgram's new la option documented and checked
Date: Mon, 2 Oct 2017 18:35:10 -0400 (EDT)

branch: master
commit 59e301aa42c65e510b555a0c619205b57c5044a8
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    BuildProgram's new la option documented and checked
    The new `--la' option to BuildProgram that was introduced in the previous
    commit was not included in the book and the given value to it wasn't
    checked. With this commit, both these issues are fixed.
 bin/buildprog/ui.c | 19 +++++++++++++++----
 doc/gnuastro.texi  | 11 +++++++++++
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/bin/buildprog/ui.c b/bin/buildprog/ui.c
index 473a1c2..28c172b 100644
--- a/bin/buildprog/ui.c
+++ b/bin/buildprog/ui.c
@@ -26,6 +26,7 @@ along with Gnuastro. If not, see 
 #include <errno.h>
 #include <error.h>
 #include <stdio.h>
+#include <string.h>
 #include <gnuastro/fits.h>
@@ -216,13 +217,23 @@ parse_opt(int key, char *arg, struct argp_state *state)
 /***************       Sanity Check         *******************/
 /* Read and check ONLY the options. When arguments are involved, do the
-   check in `ui_check_options_and_arguments'.
+   check in `ui_check_options_and_arguments'. */
 static void
 ui_read_check_only_options(struct buildprogparams *p)
+  size_t len;
+  /* If an `.la' file is given, make sure it has the correct suffix. */
+  if(p->la)
+    {
+      len=strlen(p->la);
+      if(len>=4)
+        if(strcmp(&p->la[len-3], ".la"))
+          error(EXIT_FAILURE, 0, "`%s' is not a Libtool control file name "
+                "(with a `.la' suffix). The file name given to the `--la' "
+                "(`-a') option must be a Libtool control file", p->la);
+    }
@@ -327,9 +338,9 @@ ui_read_check_inputs_setup(int argc, char *argv[], struct 
buildprogparams *p)
   /* Read the options into the program's structure, and check them and
-     their relations prior to printing.
+     their relations prior to printing. */
-  */
   /* Print the option values if asked. Note that this needs to be done
      after the option checks so un-sane values are not printed in the
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index adb2fac..babd660 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -17161,6 +17161,17 @@ confronts).
 @itemx --onlybuild
 Only build the program, don't run it. By default, the built program is
 immediately run afterwards.
address@hidden -a STR
address@hidden --la=STR
+Use the given @file{.la} file (Libtool control file) instead of the one
+that was produced from Gnuastro's configuration results. The Libtool
+control file keeps all the necesary information for building and linking a
+program with a library built by Libtool. The default
address@hidden/lib/} keeps all the information necessary to
+build a program using the Gnuastro library gathered during configure time
+(see @ref{Installation directory} for prefix). This option is useful when
+you prefer to use another Libtool control file.
 @end table

reply via email to

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