diff options
-rw-r--r-- | src/Makefile | 8 | ||||
-rwxr-xr-x | src/configure | 26 | ||||
-rw-r--r-- | src/options.c | 2 |
3 files changed, 20 insertions, 16 deletions
diff --git a/src/Makefile b/src/Makefile index 5f00f24..7d2bd52 100644 --- a/src/Makefile +++ b/src/Makefile @@ -102,7 +102,7 @@ distclean: cleanall find . -name *.o -exec rm -f {} \; find . -name "*.\~*" -exec rm -rf {} \; rm -f include.mk - rm -f version.h + rm -f config.h cleanlua: rm -f $(LUA_BYTECODE) @@ -139,8 +139,8 @@ endif install: all $(INSTALL_TARGETS) install-bin: $(EXECUTABLE) - $(INSTALL) -d $(DESTDIR)$(SBINDIR) - $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(SBINDIR) + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR) install-etc: $(INSTALL) -d $(DESTDIR)$(ETCDIR)/$(EXECUTABLE) @@ -158,7 +158,7 @@ uninstall: remove remove: $(REMOVE_TARGETS) remove-bin: - rm -f $(DESTDIR)$(SBINDIR)/$(EXECUTABLE) + rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE) remove-etc: rm -f $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE) diff --git a/src/configure b/src/configure index 58926b0..5acbd2f 100755 --- a/src/configure +++ b/src/configure @@ -42,7 +42,7 @@ LUA='' LUAC='' PREFIX='/usr/local' -SBINDIR='' +BINDIR='' ETCDIR='' MANDIR='' INSTALLMANPAGE=1 @@ -53,7 +53,7 @@ print_usage() { echo "configure --help print this" echo " --target=<TARGET> build target i.e. Linux (default: autodetect)" echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)" - echo " --sbindir=<DIR> the path to the sbin directory (default: $PREFIX/sbin)" + echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)" echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc" echo " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)" echo " --no-manpage dont't install manpage" @@ -71,8 +71,8 @@ do --prefix=*) PREFIX=${arg#--prefix=} ;; - --sbindir=*) - SBINDIR=${arg#--sbindir=} + --bindir=*) + BINDIR=${arg#--bindir=} ;; --sysconfdir=*) ETCDIR=${arg#--sysconfdir=} @@ -207,8 +207,8 @@ else LUAC=$LUA_DIR/bin/luac fi -if [ -z "$SBINDIR" ]; then - SBINDIR=$PREFIX/sbin +if [ -z "$BINDIR" ]; then + BINDIR=$PREFIX/bin fi if [ -z "$ETCDIR" ]; then @@ -238,7 +238,7 @@ STRIP := strip INSTALL := install PREFIX := '$PREFIX' -SBINDIR := '$SBINDIR' +BINDIR := '$BINDIR' ETCDIR := '$ETCDIR' EOF @@ -272,7 +272,7 @@ fi HOSTNAME=`hostname` DATE=`date +"%d.%m.%Y %H:%M:%S %Z"` -cat >> version.h <<EOF +cat > config.h <<EOF /* * gcsd version info * @@ -281,14 +281,18 @@ cat >> version.h <<EOF * use ./configure instead */ -#ifndef GCSD_version_h_INCLUDED -#define GCSD_version_h_INCLUDED +#ifndef GCSD_config_h_INCLUDED +#define GCSD_config_h_INCLUDED #define VERSION_STRING_0 "gcsd version $VERSION" #define VERSION_STRING_1 "built on $HOSTNAME, $DATE" -#endif +#define TARGET "$TARGET" +#define PREFIX "$PREFIX" +#define BINDIR "$BINDIR" +#define ETCDIR "$ETCDIR" +#endif EOF exit 0 diff --git a/src/options.c b/src/options.c index f07e176..7873a84 100644 --- a/src/options.c +++ b/src/options.c @@ -34,7 +34,7 @@ #include <lauxlib.h> #include "datatypes.h" -#include "version.h" +#include "config.h" #include "options.h" |