In the first line of my configure.ac
I need to tell autoconf what is the name of my package:
AC_INIT([xjump], [2.8], [])
Should I try to avoid duplicating the "xjump" name inside my code or is it ok to hardcode "xjump" when needed? More specifically:
1. For directories in /var
In my install script I need to create a directory inside "/var". Should I use
install-exec-hook:
mkdir -p @localstatedir@/@PACKAGE@
touch @localstatedir@/@PACKAGE@/highscores
or should I use
install-exec-hook:
mkdir -p @localstatedir@/xjump
touch @localstatedir@/xjump/highscores
Also, right now the highscore file stays there when I run make uninstall
. Should I add an uninstall hook to remove it or is there a way to handle this automatically?
2. Executable names
Right now the name of my executable is hardcoded
bin_PROGRAMS = xjump
xjump_SOURCES = game.c
Is there a way to make it not be? The following gives an error when I try to run it:
# error: 'bin_PROGRAMS' contains configure substitution
bin_PROGRAMS = @PACKAGE@
@PACKAGE@_SOURCES = game.c
3. Man pages
Similarly to the question about binaies, is there a way to make the man page name not hardcoded?
dist_man_MANS = xjump.6