[Top][All Lists]

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

minor load directive issues

From: Robert Byrnes
Subject: minor load directive issues
Date: Wed, 3 Feb 2016 16:26:21 -0500
User-agent: SquirrelMail/1.4.19

For the load directive, the docs say ...

           The initializing function will be provided the file name and line
        number of the invocation of the 'load' operation.  It should return a
        value of type 'int', which must be '0' on failure and non-'0' on
        success.  If the return value is '-1', then GNU make will _not_
        to rebuild the object file ...

However, near the end of load.c (load_file), I see ...

  /* Invoke the symbol.  */
  r = (*symp) (flocp);

  /* If it succeeded, add the load file to the loaded variable.  */
  if (r > 0)
    do_variable_definition (flocp, ".LOADED", *ldname, o_default,
f_append, 0);

The test for success should be (r != 0).  If the return value is -1,
then it will never be appended to .LOADED.

The docs also say ...

           The file OBJECT-FILE is dynamically loaded by GNU 'make'.  If
        OBJECT-FILE does not include a directory path then it is first looked
        for in the current directory.  If it is not found there, or a
        path is included, then system-specific paths will be searched.

If the OBJECT-FILE is found in one of the system-specific paths, does
it ever make sense to attempt to remake it, since the full pathname
isn't known?  The rebuilt OBJECT-FILE could also wind up in a different

I wonder if the test for "do _not_ attempt to rebuild" should be < 0,
rather than == -1.



reply via email to

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