[Mono-list] Consts.cs vs. Consts.cs.in

Jonathan Pryor jonpryor at vt.edu
Sun Oct 19 17:38:05 UTC 2014

On Oct 16, 2014, at 12:54 PM, Maury Markowitz <maury.markowitz at gmail.com> wrote:
> 1) Almost all of the projects refer to /System/Consts.cs. I do not have such a file, but I do have Consts.cs.in, which looks a lot like a cs file. I am unfamiliar with .in - is this supposed to be converted into a .cs by someone/thing, or is this simply the .cs with some extra crud at the end of the name?

A `.in` file is an "input" file, often processed by sed, to replace various strings within the file.

In the case of Consts.cs.in, the string to be replaced is @MONO_VERSION@, which is done by mono/mcs/build/Makefile [0]

	common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
		test -n '$(MONO_VERSION)'
		sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' $< > $@

 - Jon

[0]: https://github.com/mono/mono/blob/6edd8bf89e0e30a08d0ba0a5391a796d94f61abc/mcs/build/Makefile#L13

More information about the Mono-list mailing list