helpAutoconf - Support: sr #110416, documentation: ordering of basic...

 
 

sr #110416: documentation: ordering of basic macros?

Submitted by:  Karl Berry <karl>
Submitted on:  Mon 04 Jan 2021 02:10:53 AM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 06 Jan 2021 02:27:36 AM UTC, comment #2: 

Thanks Zack. That's helpful. The "Autoconf Input Layout" node, with its example, seems pretty good. I don't see any obvious changes to make, at least. Fine with me to close this, if you want. (I'll add some text to the Automake manual about it.)

Karl Berry <karl>
Project Member
Mon 04 Jan 2021 09:58:15 PM UTC, comment #1: 

There are some sketchy recommendations in the manual (here: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Autoconf-Input-Layout.html ) and I can personally tell you that the only actual constraints on the macros you listed are that AC_INIT needs to be before AM_INIT_AUTOMAKE, and AC_CONFIG_HEADERS needs to be before AC_OUTPUT.  AC_CONFIG_AUX_DIR and AC_CONFIG_SRCDIR don't need to be in any particular place; the code they generate will be shuffled into the proper location in the configure script regardless.  (I think.  There might be some subtleties I'm missing.)

It would be good to make the manual less sketchy about this, I think.  I dunno if I'll have time to revise the text anytime soon, though.

Zack Weinberg <zackw>
Project Administrator
Mon 04 Jan 2021 02:10:53 AM UTC, original submission:  

is there a recommended ordering of various config macros, namely:
AC_INIT
AC_CONFIG_AUX_DIR
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS
AC_CONFIG_SRCDIR
?

I doubt arbitrary ordering can work, but I'm not finding a recommended order in the manual. The Texinfo and Hello configure.ac files use the above, which works, but I don't know what variations are possible/supported.

I know AM_INIT_AUTOMAKE isn't Autoconf, of course, but I throw it in since it is so often present. (I think AM_INIT_AUTOMAKE does require AC_CONFIG_AUX_DIR to be called before it.)

As things are, I can put AC_CONFIG_AUX_DIR even before AC_INIT, and it seemingly still works (as far as autoconf is concerned). Not that I want to do it or think it's a good idea, but a user was quite confused about which order to be using.

Mostly just wondering about documentation here ... --thanks, karl.

Karl Berry <karl>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by karl (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-04 zackw Severity3 - Normal => 2 - Minor
        StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.6