What are .in files?

49,092

Solution 1

it's just a convention that signifies the given file is for input; in my experience, these files tend to be a sort of generic template from which a specific output file or script results.

Solution 2

I believe the automake process involving a Makefile.in is something like this:

  Makefile.am
       |
      \'/
+--------------+
|   automake   |
+--------------+
       |
      \'/
   Makefile.in
       |
      \'/
+--------------+    +--------------+
| ./configure  |<-- |   autoconf   |<-- configure.in
+--------------+    +--------------+
       |
      \'/
    Makefile

Nobody actually writes a Makefile.in. The only programmer-defined file here is the Makefile.am.

Solution 3

They are input files for the m4 macro preprocessor. Among other things, these files contain macros marked by @, that get expanded by m4.

Share:
49,092

Related videos on Youtube

user2914606
Author by

user2914606

Updated on September 18, 2022

Comments

  • user2914606
    user2914606 over 1 year

    Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with autoconf or make or something like those, but I'm not sure.

    I've tried searching for ".in file extension", "autoconf .in file extension", "autoconf .in", "autoconf dot in", and other variants, with no luck.

  • Simon Richter
    Simon Richter almost 11 years
    Well, on occasion I've written a Makefile.in, because automake wouldn't do what I want.
  • spinkus
    spinkus almost 10 years
    Out of interest, could you cite some examples where ".in" is used in this way outside of the autoconf realm?