Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Build System Refactor#15

Open
jflopezfernandez wants to merge 3 commits into
NationalSecurityAgency:masterfrom
jflopezfernandez:refactor-buildsystem
Open

Build System Refactor#15
jflopezfernandez wants to merge 3 commits into
NationalSecurityAgency:masterfrom
jflopezfernandez:refactor-buildsystem

Conversation

@jflopezfernandez

Copy link
Copy Markdown

I thought that the project structure was a little weird, and using bash scripts and a build-and-configuration system seemed like the worst of both worlds, so I refactored both the project and the build system.

As it currently stands, to build the project, you simply run ./configure && make, and the project is good to go. The gengetopt files still get generated, but they are explicit dependencies now, which the makefile generated by autoconf handles. It also still generates the config.in.h header, but now it puts it in the dedicated include folder, where all of the headers live.

I also removed the multi-levelled header and source file structure, as I'm not sure it really served a purpose, since all of it was a single project, rather than a group of projects that built separate libraries and then linked together. To modify the header and source file include directives, I just used a sed script to delete the ../(impl|io|index)/ part of the include statement.

I also updated the README file, and it now clearly indicates that the project requires gengetopt. It successfully built with multiple version of GCC, Clang, and ICC, all of which are listed on the readme (the version that were tested, that is). It also explains how to build the project, as well as some of the lmitations of the refactored version, as it currently stands. For example, while you can configure the CFLAGS, CPPFLAGS, LDFLAGS, and CC variables as normal, the compiler indicated by CC is currently used as the linker driver. This implicit dependency is on the chopping block as this refactor continues.

While the project does build and is configurable, this is still very much a work-in-progress, as the full flexibility of the autotools toolset isn't being used to its full potential. I will be referencing this issue in the commit, I just had to actually create it, per the contributing guide.

Issue #14

I thought that the project structure was a little weird, and using bash scripts and a build-and-configuration system seemed like the worst of both worlds, so I refactored both the project and the build system.

As it currently stands, to build the project, you simply run ./configure && make, and the project is good to go. The gengetopt files still get generated, but they are explicit dependencies now, which the makefile generated by autoconf handles. It also still generates the config.in.h header, but now it puts it in the dedicated include folder, where all of the headers live.

I also removed the multi-levelled header and source file structure, as I'm not sure it really served a purpose, since all of it was a single project, rather than a group of projects that built separate libraries and then linked together. To modify the header and source file include directives, I just used a sed script to delete the ../(impl|io|index)/ part of the include statement.

I also updated the README file, and it now clearly indicates that the project requires gengetopt. It successfully built with multiple version of GCC, Clang, and ICC, all of which are listed on the readme (the version that were tested, that is). It also explains how to build the project, as well as some of the lmitations of the refactored version, as it currently stands. For example, while you can configure the CFLAGS, CPPFLAGS, LDFLAGS, and CC variables as normal, the compiler indicated by CC is currently used as the linker driver. This implicit dependency is on the chopping block as this refactor continues.

While the project does build and is configurable, this is still very much a work-in-progress, as the full flexibility of the autotools toolset isn't being used to its full potential. I will be referencing this issue in the commit, I just had to actually create it, per the contributing guide.

Issue NationalSecurityAgency#14
The configuration script was also further refactored, and now libraries
are explicitly looked for, rather than the previous method of searching
for a header they included. The entire build process is now a functional
three step canonical build consisting of 'configure', 'make', and 'make
install'.
@jflopezfernandez

Copy link
Copy Markdown
Author

The most recent commit now implements installation and uninstallation functionality. In addition, the configuration process specifically searches for the libraries themselves, rather than searching for headers they include. The application can now be installed using the usual:

./configure
make
make install

The README was updated accordingly, as well, and the application version, which was set incorrectly on the original commit, is now correct once again, by using the version directly from configure.ac.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant