]> granicus.if.org Git - sysstat/commitdiff
Makefile: Add copyyear target
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 14 Feb 2021 09:52:57 +0000 (10:52 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 14 Feb 2021 09:52:57 +0000 (10:52 +0100)
Make it easier to update year in (C) messages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
Makefile.in

index 30eb9264a7d9778f68068d2ebe2ffe3a1af77a48..e8335051867d8bcd80189c9efa03bb51f4f5184b 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile to build sysstat commands
-# (C) 1999-2020 Sebastien GODARD (sysstat <at> orange.fr)
+# (C) 1999-2021 Sebastien GODARD (sysstat <at> orange.fr)
 
 # Version and package name
 VERSION = @PACKAGE_VERSION@
@@ -481,7 +481,7 @@ nls/sysstat.pot: $(wildcard *.c)
        $(XGETTEXT) -o $@ -k_ --msgid-bugs-address="sysstat <at> orange.fr" $^
 
 # Phony targets
-.PHONY: clean distclean install install_base install_all uninstall \
+.PHONY: clean distclean install install_base install_all uninstall copyyear \
        uninstall_base uninstall_all dist bdist xdist gitdist squeeze simtest extratest
 
 install_man: man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8 man/sysstat.5
@@ -534,6 +534,15 @@ squeeze:
                mv squeeze.tmp $$c; \
        done
 
+# Update Makefile.in by hand
+copyyear:
+       catalogs="$(SOURCE_CODE) iconfig README.md sa1.in sa2.in sysconfig.in sysstat.in version.in"; \
+       for c in $$catalogs; do \
+               echo "Updating file: $$c"; \
+               sed 's/-2020/-2021/g' $$c > copyyear.tmp; \
+               mv copyyear.tmp $$c; \
+       done
+
 install_nls: locales
 ifdef REQUIRE_NLS
        catalogs='$(NLSGMO)'; \