Added the information from uname in the help.
authorFrancois Fleuret <francois@fleuret.org>
Fri, 5 Mar 2010 07:03:32 +0000 (08:03 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Fri, 5 Mar 2010 07:03:32 +0000 (08:03 +0100)
Makefile
dus.c

index d147886..fc4b561 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,13 +26,15 @@ MAN_PATH = /usr/share/man/man1
 
 LDFLAGS=
 
 
 LDFLAGS=
 
+UNAME=\"$(shell uname -srmn)\"
+
 ifeq ($(DEBUG),yes)
   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
 else
   OPTIMIZE_FLAG = -O2
 endif
 
 ifeq ($(DEBUG),yes)
   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
 else
   OPTIMIZE_FLAG = -O2
 endif
 
-CFLAGS = -Wall -ansi -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTIMIZE_FLAG)
+CFLAGS = -Wall -ansi -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUNAME="$(UNAME)" $(OPTIMIZE_FLAG)
 
 all: dus
 
 
 all: dus
 
diff --git a/dus.c b/dus.c
index e0b602e..e215207 100644 (file)
--- a/dus.c
+++ b/dus.c
@@ -293,7 +293,7 @@ void print_sorted(struct file_with_size *root, int width, int height) {
 /**********************************************************************/
 void print_help(FILE *out) {
   fprintf(out, "Usage: dus [OPTION]... [FILE]...\n");
 /**********************************************************************/
 void print_help(FILE *out) {
   fprintf(out, "Usage: dus [OPTION]... [FILE]...\n");
-  fprintf(out, "Version %s\n", VERSION_NUMBER);
+  fprintf(out, "Version %s (%s)\n", VERSION_NUMBER, UNAME);
   fprintf(out, "List files and directories sorted according to their size or content size. Take the content of the current directory as argument if none is provided.\n");
   fprintf(out, "\n");
   fprintf(out, "   -d          ignore files and directories starting with a '.'\n");
   fprintf(out, "List files and directories sorted according to their size or content size. Take the content of the current directory as argument if none is provided.\n");
   fprintf(out, "\n");
   fprintf(out, "   -d          ignore files and directories starting with a '.'\n");