-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix installation directory variable substitution
Most autoconf installation directory variables rely on ${prefix} or ${exec_prefix}. This behavior is mandated by the GNU coding standards. During "make", it allows these variables to be redefined from the value specified at "configure". And during "make install", it allows a different installation location to be specified without changing the compiled-in location. The old configure.ac would set these variables during "configure" and substitute them via AC_CONFIG_FILES. Some files would use these values (e.g., conman.init and the manpages), while others would hard-code conventional paths (e.g., the sysvinit and systemd config files). This commit fixes this behavior so installation directory variable substitution now follows the GNU coding standards. Autoconf-style template files are created where needed. In Makefile.am, these files are specified in SUBSTITUTE_FILES. To ensure they are generated during "make", $(SUBSTITUTE_FILES) is added to noinst_DATA. (Note that listing the manpages here is redundant since those are also specified in man_MANS, but doing so doesn't cause problems and simplifies the Makefile.) "substitute" is defined for performing the autoconf-style variable substition via sed. A Makefile rule is defined for creating the $(SUBSTITUTE_FILES), and AM_V_GEN is used to match the make output when AM_SILENT_RULES is enabled. In configure.ac, AC_CONFIG_FILES is now reduced to just the Makefile. In Makefile.am, distclean-local is modified to rmdir both the etc/ and man/ directories. These will only be removed if they are empty. This should only happen during VPATH builds. In conman.conf.5.in, the reference to the "@datadir@/@Package@/exec" directory is updated to use the automake variable "@pkgdatadir@" since it is now supported via $(substitute). Reference: - https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html - https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html - https://autotools.io/automake/silent.html - https://www.gnu.org/software/automake/manual/html_node/Uniform.html Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
- Loading branch information
Showing
7 changed files
with
77 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters