Fix install-gmo target to recompile gmo files only if needed

Signed-off-by: cao-fei8 <caofei@xfusion.com>
This commit is contained in:
cao-fei8 2023-01-06 16:51:50 +08:00
parent c4375bfd78
commit 5878544cac
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,41 @@
From 9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261 Mon Sep 17 00:00:00 2001
From: Aleksey <rhash.admin@gmail.com>
Date: Sun, 31 Oct 2021 02:49:04 +0300
Subject: [PATCH] Fix install-gmo target to recompile gmo files only if needed
---
Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 6031e43..c127379 100644
--- a/Makefile
+++ b/Makefile
@@ -293,7 +293,7 @@ clean-bindings:
clean-local:
rm -f *.o $(RHASH_SHARED) $(RHASH_STATIC)
- rm -f po/*.gmo po/*.po~
+ rm -f po/*.gmo po/*.po~ po/compile-gmo.tag
distclean: clean-local
rm -f config.log config.mak $(SPECFILE) $(LIBRHASH_PC)
@@ -309,11 +309,14 @@ update-po:
msgmerge -U $$f po/rhash.pot; \
done
-compile-gmo:
+po/compile-gmo.tag: $(I18N_FILES)
for f in $(I18N_FILES); do \
g=`basename $$f .po`; \
msgfmt -o po/$$g.gmo $$f; \
done
+ touch $@
+
+compile-gmo: po/compile-gmo.tag
install-gmo: compile-gmo
for f in $(I18N_FILES); do \
--
2.33.0

View File

@ -1,13 +1,13 @@
Name: rhash
Version: 1.4.2
Release: 2
Release: 3
Summary: Great utility for computing hash sums
License: MIT
URL: https://github.com/rhash/RHash
Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{version}.tar.gz
Patch1: 0001-fix-incorrect-total-message-in-check-embedded-mode.patch
Patch2: 0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch
BuildRequires: gcc
%description
@ -65,6 +65,9 @@ make test-shared
%{_mandir}/man1/*.1*
%changelog
* Fri Jan 6 2023 caofei <caofei@xfusion.com> - 1.4.2-3
- Fix install-gmo target to recompile gmo files only if needed
* Fri Jan 6 2023 caofei <caofei@xfusion.com> - 1.4.2-2
- fix incorrect total message in check-embedded mode