]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Makefile.in: Fix OS detection.
authorAndre Noll <maan@systemlinux.org>
Fri, 28 Dec 2007 13:02:55 +0000 (14:02 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 28 Dec 2007 13:02:55 +0000 (14:02 +0100)
The uname_s variable was never defined. Define it and rename SYSTEM
to UNAME_RS while we are at it.

Makefile.in
command.c

index 9382ce757a51311a9c7356667a2db2ce229a735e..0af8cdddc27fa5800d694c8d3ed8982a8d77166e 100644 (file)
@@ -9,7 +9,8 @@ MANDIR := @datarootdir@/man/man1
 install_sh := @install_sh@
 
 build_date := $(shell date)
-system := $(shell uname -rs)
+uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
+uname_rs := $(shell uname -rs)
 cc_version := $(shell $(CC) --version | head -n 1)
 codename := solar saturation
 
@@ -26,7 +27,7 @@ DEBUG_CPPFLAGS += -Wredundant-decls
 # many warnings about trivial stuff
 # CPPFLAGS += -Wconversion
 
-ifeq ($(uname_S),Linux)
+ifeq ($(uname_s),Linux)
        CPPFLAGS += -fdata-sections -ffunction-sections
        LDFLAGS += -Wl,--gc-sections
        CPPFLAGS += -Wstrict-prototypes
@@ -39,7 +40,7 @@ CPPFLAGS += -Wchar-subscripts
 CPPFLAGS += -Wformat-security
 CPPFLAGS += -DBINDIR='"$(BINDIR)"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
-CPPFLAGS += -DSYSTEM='"$(system)"'
+CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
 CPPFLAGS += -DCODENAME='"$(codename)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 CPPFLAGS += -Werror-implicit-function-declaration
index d35113a500f0a2b78ce853996db9413bafd0be4f..6886ae9b71d442b1169ad05293ae67eeba0fc19e 100644 (file)
--- a/command.c
+++ b/command.c
@@ -309,7 +309,7 @@ int com_version(int fd, int argc, __a_unused char * const * argv)
                return -E_COMMAND_SYNTAX;
        return send_buffer(fd, VERSION_TEXT("server")
                "built: " BUILD_DATE "\n"
-               SYSTEM ", " CC_VERSION "\n"
+               UNAME_RS ", " CC_VERSION "\n"
        );
 }