--- a/nvramtool/common.c +++ b/nvramtool/common.c @@ -34,7 +34,7 @@ const char prog_name[] = "nvramtool"; /* version of this program */ -const char prog_version[] = "2.1"; +const char prog_version[] = "2.1 (r" NVRAMTOOL_REVISION ")"; /**************************************************************************** * get_line_from_file --- a/nvramtool/Makefile +++ b/nvramtool/Makefile @@ -20,10 +20,15 @@ all: dep $(PROGRAM) +SVNDEF := -D'NVRAMTOOL_REVISION="$(shell basename `cd ..;pwd`|cut -c17-)"' + $(PROGRAM): $(OBJS) $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS) $(STRIP) $(STRIP_ARGS) $(PROGRAM) +common.o: common.c + $(CC) -c $(CFLAGS) $(SVNDEF) $< -o $@ + clean: rm -f $(PROGRAM) *.o