Allow kernel extensions to use GAP header files via #include <gap/HEADER.h>
instead of #include "src/HEADER.h"
or #include "HEADER.h"
(improves compatibility with "install" GAP versions shipped by Linux distributions)
#5187
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, some GAP packages still use
#include "src/HEADER.h"
toaccess GAP headers. Typically one sees
#include "src/compiled.h"
toget "all" (well, most) GAP headers in one go.
That's not great for various reasons. For one, it is not obvious that
this is a GAP header (this is often dealt with by adding a comment). It
also doesn't mesh well with GAP installations made via
make install
,which install headers into
PREFIX/include/gap
.Indeed, we have a workaround in place specifically to deal with that,
which installs a file
PREFIX/include/gap/src/compiled.h
that includesthe real
compiled.h
to allow such packages to compile anyway. Butthat's not quite enough as some packages directly include some other
headers (e.g. because
compiled.h
does not include them). To deal withthat better, this patch now installs a second set of the headers into a
src
directory so that all those packages work again.Moreover,
compiled.h
(or rathergap_all.h
) is extended to cover twomore headers used by packages.
The longterm plan is to migrate packages away from this. Indeed, I
already changed many packages to at least use
#include "compiled.h"
with the goal to eventually dispose of the
src
hack altogether.Going one step further, the plan is that one day packages will be able
to use
#include <gap/HEADER.h>
. This PR enables this: for classic GAPbuilds, it does so by creating a symlink
build/gap
pointing tosrc
.And for
make install
we modify theGAP_CPPFLAGS
in the installedsysinfo.gap
suitably.In addition, already today, packages can do
#include <gap_all.h>
,provided one is willing to require at least GAP 4.11.1.