From: Andre Noll Date: Fri, 28 Dec 2007 13:02:55 +0000 (+0100) Subject: Makefile.in: Fix OS detection. X-Git-Tag: v0.3.0~24 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=32fce523b0891e60328211cc936f22a0e5c2942d Makefile.in: Fix OS detection. The uname_s variable was never defined. Define it and rename SYSTEM to UNAME_RS while we are at it. --- diff --git a/Makefile.in b/Makefile.in index 9382ce75..0af8cddd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/command.c b/command.c index d35113a5..6886ae9b 100644 --- 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" ); }