diff --git a/dist.mk b/dist.mk index 0ce4377ae..794b27771 100644 --- a/dist.mk +++ b/dist.mk @@ -2,14 +2,15 @@ ifdef PACKAGE_NAME dist-name = $(PACKAGE_NAME)-$(PACKAGE_VERSION) -dist-files := - -dist: $(dist-name).tar.bz2 +dist: $(dist-name).tar.bz2 $(dist-name).tar.xz $(dist-name).tar.bz2: $(dist-files) - $(suppress) tar cvfj $@ $(dist-files) --transform 's,^,$(dist-name)/,' + $(trace-gen) tar cfj $@ $(sort $(dist-files)) --transform 's,^,$(dist-name)/,' -clean-files += $(dist-name).tar.bz2 +$(dist-name).tar.xz: $(dist-files) + $(trace-gen) tar cfJ $@ $(sort $(dist-files)) --transform 's,^,$(dist-name)/,' + +clean-files += $(dist-name).tar.bz2 $(dist-name).tar.xz print-top-help += echo " dist: Generate a source distribution"; diff --git a/lib.mk b/lib.mk index d930b0ef3..6e02bc912 100644 --- a/lib.mk +++ b/lib.mk @@ -10,6 +10,7 @@ bin-scripts := noinst-scripts := man-pages := install-tests := +dist-files := OS = $(shell uname -s) @@ -49,7 +50,6 @@ endif include mk/functions.mk include mk/tracing.mk include mk/clean.mk -include mk/dist.mk include mk/install.mk include mk/libraries.mk include mk/programs.mk @@ -80,6 +80,9 @@ $(foreach test, $(install-tests), $(eval $(call run-install-test,$(test)))) $(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/man$(patsubst .%,%,$(suffix $(file)))))) +include mk/dist.mk + + .PHONY: default all man help all: $(programs-list) $(libs-list) $(jars-list) $(man-pages)