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

 
 

sr #110416: documentation: ordering of basic macros?

Submitter:  Karl Berry <karl>
Submitted:  Mon 04 Jan 2021 02:10:53 AM UTC
   
 
Priority:  * 3 - Release N+1 Severity:  2 - Minor
Status:  Confirmed Privacy:  Public
Assigned to:  None Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Dec 2023 03:57:42 PM UTC, comment #3: 

I don't have any concrete plans here but I do think it would be possible to do somewhat better in Autoconf's documentation, for instance by spelling out what is an actual requirement and what is just a recommendation.  Leaving open as 'eventually'.

Zack Weinberg <zackw>
Group administrator
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>
Group 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>
Group 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>
Group 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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-08 zackw Priority2 - Eventually 3 - Release N+1
    2023-12-08 zackw Priority5 - Unprioritized 2 - Eventually
    2021-01-04 zackw Severity3 - Normal 2 - Minor
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code