diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:09 +0000 |
commit | 0db324e2e5d9d3347ea0e93138372fb65aac09e6 (patch) | |
tree | 1b794022fb98db123c73021e75286a82c116aa7f /share/mk/dist/files.mk | |
parent | Releasing progress-linux version 6.05.01-1~progress7.99u1. (diff) | |
download | manpages-0db324e2e5d9d3347ea0e93138372fb65aac09e6.tar.xz manpages-0db324e2e5d9d3347ea0e93138372fb65aac09e6.zip |
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/mk/dist/files.mk')
-rw-r--r-- | share/mk/dist/files.mk | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/share/mk/dist/files.mk b/share/mk/dist/files.mk new file mode 100644 index 0000000..bc3f7ff --- /dev/null +++ b/share/mk/dist/files.mk @@ -0,0 +1,62 @@ +# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_DIST_FILES_INCLUDED +MAKEFILE_DIST_FILES_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/git.mk +include $(MAKEFILEDIR)/configure/build-depends/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/sed.mk +include $(MAKEFILEDIR)/configure/verbose.mk +include $(MAKEFILEDIR)/configure/version.mk +include $(MAKEFILEDIR)/dist/_.mk + + +DISTFILES := $(shell $(DISTFILESCMD) | $(SED) 's,:,\\:,g') +_DISTFILES := $(patsubst $(srcdir)/%,$(_DISTDIR)/%,$(DISTFILES)) +_DISTPAGES := $(filter $(_DISTDIR)/man%,$(_DISTFILES)) +_DISTVERSION := $(_DISTDIR)/share/mk/configure/version.mk +_DISTOTHERS := $(filter-out $(_DISTPAGES) $(_DISTVERSION), $(_DISTFILES)) + + +FORCE_DISTVERSION := \ + $(shell \ + if $(TEST) -f $(_DISTVERSION); then \ + <$(_DISTVERSION) \ + $(GREP) \ + -e '^DISTVERSION :=' \ + -e '^DISTNAME :=' \ + -e '^DISTDATE :=' \ + | $(SED) '/^DISTVERSION := $(DISTVERSION)$$/d' \ + | $(SED) '/^DISTNAME := $(DISTNAME)$$/d' \ + | $(SED) '/^DISTDATE := $(DISTDATE)$$/d' \ + | $(GREP) ^ $(HIDE_ERR) >&2 \ + && $(ECHO) FORCE; \ + fi; \ + ) + + +$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% $(MK) | $$(@D)/ + $(info $(INFO_)SED $@) + <$< \ + $(SED) "/^.TH/s/(date)/$$($(GIT) log --format=%cs -1 -- $< $(HIDE_ERR))/" \ + | $(SED) '/^.TH/s/(unreleased)/$(DISTVERSION)/' \ + | $(INSTALL_DATA) -T /dev/stdin $@ + +$(_DISTVERSION): $(MAKEFILEDIR)/configure/version.mk $(MK) $(FORCE_DISTVERSION) | $$(@D)/ + $(info $(INFO_)SED $@) + <$< \ + $(SED) 's/^DISTVERSION *:=.*/DISTVERSION := $(DISTVERSION)/' \ + | $(SED) 's/^DISTNAME *:=.*/DISTNAME := $(DISTNAME)/' \ + | $(SED) 's/^DISTDATE *:=.*/DISTDATE := $(DISTDATE)/' \ + | $(INSTALL_DATA) -T /dev/stdin $@ + +$(_DISTOTHERS): $(_DISTDIR)/%: $(srcdir)/% $(MK) | $$(@D)/ + $(info $(INFO_)CP $@) + $(CP) -dT $< $@ + + +endif # include guard |