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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arduino is basically a simplified/streamlined cross-compilation
toolchain with very tightly coupled IDE integration.

I'd just provide a .sample and tell people what to do with it in the
README. The alternative is to provide config.h as is and tell people
to use "git update-index --assume-unchanged" immediately after cloning
to ignore changes to the file, but this is prone to people
accidentally committing credentials.

On Sat, Mar 18, 2017 at 6:11 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> David Lang <david@xxxxxxx> writes:
>
>>> 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".



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]