Version information is now fetched and defined by the Makefile.

No more need to update the version manually in the init.c source.
This commit is contained in:
Jesse Smith 2018-07-01 18:44:57 -03:00
parent 8cc9f34ca4
commit 7656f9d5f9
4 changed files with 15 additions and 9 deletions

View File

@ -1,8 +1,9 @@
all install clean distclean:
$(MAKE) -C src $@
PACKAGE=sysvinit
VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
all install clean distclean:
$(MAKE) VERSION=$(VERSION) -C src $@
GITLOGIN=$(shell git remote -v | head -n 1 | cut -f 1 -d '@' | sed 's/origin\t//g')
override TMP:=$(shell mktemp -du $(VERSION).XXXXXXXX)
override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.xz

View File

@ -4,13 +4,12 @@ sysvinit (2.91) UNRELEASED; urgency=low
* Adjusted order of compile flags to make it easier for downstream
to adjust optimization level. Patch provided by Matias Fonzo.
<<<<<<< HEAD
Can now set optimization level in CFLAGS variable.
* Added --version command line flag to display current version info.
Updated manual page for init.8 to match.
=======
Can now set optimization level in CFLAGS varible.
>>>>>>> 5f6d86d216fd25a5086750465e73ed5579a86d18
* Version information is now fetched and defined by the Makefile.
No more need to update the version manually in the init.c source.
sysvinit (2.90) world; urgency=low

View File

@ -10,7 +10,7 @@
CPPFLAGS =
CFLAGS ?= -O2
override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE
override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"
override CFLAGS += $(shell getconf LFS_CFLAGS)
STATIC =
MANDB := s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@

View File

@ -8,7 +8,13 @@
* Version: @(#)init.c 2.86 30-Jul-2004 miquels@cistron.nl
* Version: init.c 2.90 18-Jun-2018 jsmith@resonatingmedia.com
*/
#define VERSION "2.90"
/*
Version information is not placed in the top-level Makefile by default
*/
#ifndef VERSION
#define VERSION "2.91"
#endif
/*
* This file is part of the sysvinit suite,
* Copyright (C) 1991-2004 Miquel van Smoorenburg.