-
Notifications
You must be signed in to change notification settings - Fork 469
Avoid overwriting config.h with generated header #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If this doesn't cause problems with the XCode build, it would be nice to not have config.h in git. If it does cause a problem, it is ok to just reject this pull request. It is just a minor annoyance (that I hit 10 times this morning when changing branches, rebasing, etc...). |
the problem is that it will cause issues with the xcode based internal port at Apple, but we may be able to carry with that file removed from the git repository (IOW not backport this to Darwin). @das is that ok with you? (if yes please merge) |
as long as we have the Xcode project in the repo, we should also keep the config.h so that you can build on Darwin with Xcode. If we were to remove the config.h we should also remove the project and its associated xcconfig files etc (as it would be broken anyway) FWIW I've always kept this as part of the opensource drop to document how we build libdispatch on Darwin (and enable others to potentially replicate that), so I'm not a fan such a removal. IIRC there is a way to ask autoheader to use a different filename than config.h, ISTM that would be a better way to solve this (and use __has_include() to switch between config.h and that header). We could also rename the config.h used by the Xcode build (but that name has history associated at this point) |
yeah I was assuming that you would say something like that and do that trick. the other way is also to play with include paths and have the ./configure generated one shadow the config/config.h one @dgrove-oss can you try to play tricks in that direction instead please? |
by "that direction" I mean either using include paths based hiding or using a __has_header() kind of thing which is probably cleaner. |
sure. I'll take a look tomorrow. |
Change name of generated header file to config_ac.h and use __has_include to prefer the generated file if it is present. Avoids stomping on the config.h used by XCode when building using autotools.
237742d
to
3d22f52
Compare
Thanks for the alternate suggestion; changing the name of the generated file and using has_include was very easy. Pull request updated. |
Avoid overwriting config.h with generated header Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
config.h is generated by the autotools build process.
Having it stored in git causes useless diffs and the
need for git checkout operations when rebasing because
the generated version differs from the version in git.