summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-29 16:05:16 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-29 16:05:16 -0400
commit7d1baa39157b6ab5e9f0cb6b5413f6fc1e2d4eea (patch)
tree0be2d9dca63ab63f4d0060de20de956128b30041
parent42bc23772059e663a8195a086e0b5b3c32366a92 (diff)
work on things
-rw-r--r--build-aux/Makefile.each.tail/00-dist.mk2
-rw-r--r--build-aux/Makefile.once.head/00-dist.mk17
-rw-r--r--build-aux/Makefile.once.tail/00-dist.mk30
3 files changed, 19 insertions, 30 deletions
diff --git a/build-aux/Makefile.each.tail/00-dist.mk b/build-aux/Makefile.each.tail/00-dist.mk
index 042af23..1ab7568 100644
--- a/build-aux/Makefile.each.tail/00-dist.mk
+++ b/build-aux/Makefile.each.tail/00-dist.mk
@@ -14,5 +14,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
ifeq ($(outdir),$(topoutdir))
-$(_am)clean_files += $(addprefix $(PACKAGE)-*,$($(_am)distexts) /)
+std.clean_files += $(addprefix $(PACKAGE)-*,$(dist.exts) /)
endif
diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk
index 5be9c72..314f7f8 100644
--- a/build-aux/Makefile.once.head/00-dist.mk
+++ b/build-aux/Makefile.once.head/00-dist.mk
@@ -1,16 +1 @@
-# Copyright (C) 2016 Luke Shumaker
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-$(_am)distexts ?= .tar.gz
+dist.exts ?= .tar.gz
diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk
index 2527404..d8fa226 100644
--- a/build-aux/Makefile.once.tail/00-dist.mk
+++ b/build-aux/Makefile.once.tail/00-dist.mk
@@ -17,10 +17,7 @@
.PHONY: dist
dist: $(addprefix $(topoutdir)/$(PACKAGE)-$(VERSION),$($(_am)distexts)
-$(topoutdir)/$(PACKAGE)-$(VERSION).tar: $(topoutdir)/$(PACKAGE)-$(VERSION)
- $(TAR) cf $@ -C $(<D) $(<F)
-
-_am_copyfile = $(MKDIRS) $(dir $2) && $(CP) -T $1 $2
+_am_copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2
_am_addfile = $(call _am_copyfile,$3,$2/$(call _am_relto,$1,$3))
$(topoutdir)/$(PACKAGE)-$(VERSION): $(_am_src_files/$(topoutdir)) $(_am_gen_files/$(topoutdir))
$(RM) -r $@
@@ -29,12 +26,19 @@ $(topoutdir)/$(PACKAGE)-$(VERSION): $(_am_src_files/$(topoutdir)) $(_am_gen_file
$(foreach f,$^,$(call _am_addfile,$(topsrcdir),$(@D)/tmp.$(@F).$$$$,$f) &&) \
$(MV) $(@D)/tmp.$(@F).$$$$ $@ || $(RM) -r $(@D)/tmp.$(@F).$$$$
-# For some reason I can't explain, RM doesn't really get set with ?=
-CP ?= cp
-MKDIR ?= mkdir
-MKDIRS ?= mkdir -p
-MV ?= mv
-RM = rm -f
-RMDIRS ?= rmdir -p
-TAR ?= tar
-TRUE ?= true
+$(topoutdir)/$(PACKAGE)-$(VERSION).tar: $(topoutdir)/$(PACKAGE)-$(VERSION)
+ $(TAR) cf $@ -C $(<D) $(<F)
+$(topoutdir)/$(PACKAGE)-$(VERSION).tar.gz: $(topoutdir)/$(PACKAGE)-$(VERSION).tar
+ $(GZIP) $(GZIP_ENV) < $< > $@
+
+CP ?= cp
+GZIP ?= gzip
+MKDIR ?= mkdir
+MKDIR_P ?= mkdir -p
+MV ?= mv
+RM ?= rm -f
+RMDIR_P ?= rmdir -p
+TAR ?= tar
+TRUE ?= true
+
+GZIP_ENV ?= --best