tree-wide: standardize on $(PACKAGE_VERSION) for the version string

We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents.
$(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and
drop the other define.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-04-03 12:15:33 -04:00
parent 1b81e156c5
commit 948aaa7c52
17 changed files with 23 additions and 24 deletions

View File

@ -6269,7 +6269,6 @@ substitutions = \
'|exec_prefix=$(exec_prefix)|' \
'|libdir=$(libdir)|' \
'|includedir=$(includedir)|' \
'|VERSION=$(VERSION)|' \
'|rootprefix=$(rootprefix)|' \
'|udevlibexecdir=$(udevlibexecdir)|' \
'|SUSHELL=$(SUSHELL)|' \
@ -6400,7 +6399,7 @@ XSLTPROC_FLAGS = \
--stringparam funcsynopsis.style ansi \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
--stringparam systemd.version $(VERSION) \
--stringparam systemd.version $(PACKAGE_VERSION) \
--path '$(builddir)/man:$(srcdir)/man'
XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
@ -6634,11 +6633,11 @@ built-sources: $(BUILT_SOURCES)
.PHONY: git-tag
git-tag:
git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
git tag -s "v$(PACKAGE_VERSION)" -m "systemd $(PACKAGE_VERSION)"
.PHONY: git-tar
git-tar:
git archive -o systemd-$(VERSION).tar.gz --prefix=systemd-$(VERSION)/ HEAD
git archive -o systemd-$(PACKAGE_VERSION).tar.gz --prefix=systemd-$(PACKAGE_VERSION)/ HEAD
%.asc: %
gpg2 --detach-sign -a -o $@ $<

View File

@ -1674,7 +1674,7 @@ AC_CONFIG_FILES([
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
$PACKAGE_NAME $PACKAGE_VERSION
libcryptsetup: ${have_libcryptsetup}
PAM: ${have_pam}

View File

@ -627,7 +627,7 @@ static int analyze_plot(sd_bus *bus) {
"<!-- that render these files properly but much slower are ImageMagick, -->\n"
"<!-- gimp, inkscape, etc. To display the files on your system, just -->\n"
"<!-- point your browser to this file. -->\n\n"
"<!-- This plot was generated by systemd-analyze version %-16.16s -->\n\n", VERSION);
"<!-- This plot was generated by systemd-analyze version %-16.16s -->\n\n", PACKAGE_VERSION);
/* style sheet */
svg("<defs>\n <style type=\"text/css\">\n <![CDATA[\n"

View File

@ -29,7 +29,7 @@
#endif
/* magic string to find in the binary image */
static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " VERSION " ####";
static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " PACKAGE_VERSION " ####";
static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
@ -363,7 +363,7 @@ static VOID print_status(Config *config, CHAR16 *loaded_image_path) {
uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK);
uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
Print(L"systemd-boot version: " VERSION "\n");
Print(L"systemd-boot version: " PACKAGE_VERSION "\n");
Print(L"architecture: " EFI_MACHINE_TYPE_NAME "\n");
Print(L"loaded image: %s\n", loaded_image_path);
Print(L"UEFI specification: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff);
@ -781,7 +781,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load
break;
case KEYPRESS(0, 0, 'v'):
status = PoolPrint(L"systemd-boot " VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d",
status = PoolPrint(L"systemd-boot " PACKAGE_VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d",
ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff,
ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
break;
@ -1718,7 +1718,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
InitializeLib(image, sys_table);
init_usec = time_usec();
efivar_set_time_usec(L"LoaderTimeInitUSec", init_usec);
efivar_set(L"LoaderInfo", L"systemd-boot " VERSION, FALSE);
efivar_set(L"LoaderInfo", L"systemd-boot " PACKAGE_VERSION, FALSE);
s = PoolPrint(L"%s %d.%02d", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
efivar_set(L"LoaderFirmwareInfo", s, FALSE);
FreePool(s);

View File

@ -23,7 +23,7 @@
#include "measure.h"
/* magic string to find in the binary image */
static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " VERSION " ####";
static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " PACKAGE_VERSION " ####";
static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;

View File

@ -390,7 +390,7 @@ static int trie_store(struct trie *trie, const char *filename) {
int64_t size;
struct trie_header_f h = {
.signature = HWDB_SIG,
.tool_version = htole64(atoi(VERSION)),
.tool_version = htole64(atoi(PACKAGE_VERSION)),
.header_size = htole64(sizeof(struct trie_header_f)),
.node_size = htole64(sizeof(struct trie_node_f)),
.child_entry_size = htole64(sizeof(struct trie_child_entry_f)),

View File

@ -12,6 +12,6 @@ includedir=@includedir@
Name: libudev
Description: Library to access udev device information
Version: @VERSION@
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -ludev
Cflags: -I${includedir}

View File

@ -392,7 +392,7 @@ int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
case 'V':
printf("%s\n", VERSION);
printf("%s\n", PACKAGE_VERSION);
return EXIT_SUCCESS;
case 'm':

View File

@ -88,7 +88,7 @@ int main(int argc, char *argv[]) {
if (udev == NULL)
return EXIT_FAILURE;
log_debug("version %s", VERSION);
log_debug("version %s", PACKAGE_VERSION);
mac_selinux_init();
action = argv[1];

View File

@ -391,7 +391,7 @@ static int set_options(struct udev *udev,
break;
case 'V':
printf("%s\n", VERSION);
printf("%s\n", PACKAGE_VERSION);
exit(0);
case 'x':

View File

@ -239,7 +239,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int
int err = 0;
memzero(&ctrl_msg_wire, sizeof(struct udev_ctrl_msg_wire));
strcpy(ctrl_msg_wire.version, "udev-" VERSION);
strcpy(ctrl_msg_wire.version, "udev-" PACKAGE_VERSION);
ctrl_msg_wire.magic = UDEV_CTRL_MAGIC;
ctrl_msg_wire.type = type;

View File

@ -1,5 +1,5 @@
Name: udev
Description: udev
Version: @VERSION@
Version: @PACKAGE_VERSION@
udevdir=@udevlibexecdir@

View File

@ -352,7 +352,7 @@ static int trie_store(struct trie *trie, const char *filename) {
int64_t size;
struct trie_header_f h = {
.signature = HWDB_SIG,
.tool_version = htole64(atoi(VERSION)),
.tool_version = htole64(atoi(PACKAGE_VERSION)),
.header_size = htole64(sizeof(struct trie_header_f)),
.node_size = htole64(sizeof(struct trie_node_f)),
.child_entry_size = htole64(sizeof(struct trie_child_entry_f)),

View File

@ -376,7 +376,7 @@ static int uinfo(struct udev *udev, int argc, char *argv[]) {
export_prefix = optarg;
break;
case 'V':
printf("%s\n", VERSION);
printf("%s\n", PACKAGE_VERSION);
return 0;
case 'h':
help();

View File

@ -59,7 +59,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
{}
};
log_debug("version %s", VERSION);
log_debug("version %s", PACKAGE_VERSION);
while ((c = getopt_long(argc, argv, "a:N:h", options, NULL)) >= 0)
switch (c) {

View File

@ -25,7 +25,7 @@
#include "udev.h"
static int adm_version(struct udev *udev, int argc, char *argv[]) {
printf("%s\n", VERSION);
printf("%s\n", PACKAGE_VERSION);
return 0;
}

View File

@ -1492,7 +1492,7 @@ static int parse_argv(int argc, char *argv[]) {
help();
return 0;
case 'V':
printf("%s\n", VERSION);
printf("%s\n", PACKAGE_VERSION);
return 0;
case '?':
return -EINVAL;
@ -1740,7 +1740,7 @@ int main(int argc, char *argv[]) {
if (arg_daemonize) {
pid_t pid;
log_info("starting version " VERSION);
log_info("starting version " PACKAGE_VERSION);
/* connect /dev/null to stdin, stdout, stderr */
if (log_get_max_level() < LOG_DEBUG) {