git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Is there a way to have a local version of a header file?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2017, 23:11 UTC
Message-ID
<xmqqy3w2yybt.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<nycvar.QRO.7.75.62.1703181539310.3797@qynat-yncgbc>
David Lang <david@lang.hm> writes:
Show 9 quoted lines
>> Ship a config.h.sample file, have a Makefile rule that is forced to
>> run before any compilation happens that checks if config.h exists
>> and then created it if missing by copying config.h.sample over, and
>> then all other source files can include config.h without having to
>> know anything about config.h.sample's existence.
>>
>> Did I miss something?
>
> There is no makefile with the arduino IDE/build system :-(

How does "the build system" you want to make it work with actually work? Is it incapable of "compiling" a "source file" into an "object file" that happens to be a text using an arbitrary "compiler"?

I was hoping that readers are imaginative enough to replace Makefile with whatever way things are normally built with when reading my message, and the reader can just replace "source file" with "config.h.sample", "compiler" with "test -f config.h || cat config.h.sample >config.h" and "object file" with "config.h".

Previous: David LangNext: Samuel Lijin
Message 7 of 11 in “Is there a way to have a local version of a header file?”
  1. David LangMar 18, 2017
  2. Ævar Arnfjörð BjarmasonMar 18, 2017
  3. David LangMar 18, 2017
  4. Ævar Arnfjörð BjarmasonMar 18, 2017
  5. Junio C HamanoMar 18, 2017
  6. David LangMar 18, 2017
  7. Junio C HamanoMar 18, 2017
  8. Samuel LijinMar 18, 2017
  9. Johannes SixtMar 19, 2017
  10. David LangMar 19, 2017
  11. Jakub NarębskiMar 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.