summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-29 17:37:41 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-29 17:37:41 -0400
commit5cc0d6fb359da72dc12474ca34a22f9d45008c6e (patch)
treee36623f4e18cfa304f35debc32ae7ba8c390466c
parente216c0d216ba90f5f8a89ad7e4aa8804a33d41c4 (diff)
rename PACKAGE->dist.name VERSION->dist.version
-rw-r--r--build-aux/Makefile.each.tail/00-dist.mk4
-rw-r--r--build-aux/Makefile.once.head/00-dist.mk11
-rw-r--r--build-aux/Makefile.once.tail/00-dist.mk6
3 files changed, 14 insertions, 7 deletions
diff --git a/build-aux/Makefile.each.tail/00-dist.mk b/build-aux/Makefile.each.tail/00-dist.mk
index 6e6a5cbfd8..d85ecc08cd 100644
--- a/build-aux/Makefile.each.tail/00-dist.mk
+++ b/build-aux/Makefile.each.tail/00-dist.mk
@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
ifeq ($(outdir),$(topoutdir))
-std.clean_files += $(addprefix $(PACKAGE)-*,$(dist.exts) .tar /)
+std.clean_files += $(addprefix $(dist.name)-*,$(dist.exts) .tar /)
endif
-$(outdir)/dist: $(addprefix $(topoutdir)/$(PACKAGE)-$(VERSION),$(dist.exts))
+$(outdir)/dist: $(addprefix $(topoutdir)/$(dist.name)-$(dist.version),$(dist.exts))
diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk
index 98fc6b3b4e..6a54b7d0b9 100644
--- a/build-aux/Makefile.once.head/00-dist.mk
+++ b/build-aux/Makefile.once.head/00-dist.mk
@@ -16,8 +16,15 @@
# Developer configuration
dist.exts ?= .tar.gz
-PACKAGE ?= YOUR_PACKAGE_NAME
-VERSION ?= 0.0.1
+dist.name ?= $(PACKAGE)
+dist.version ?= $(VERSION)
+
+ifeq ($(dist.name),)
+$(error dist.name must be set)
+endif
+ifeq ($(dist.version),)
+$(error dist.name must be set)
+endif
# User configuration
diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk
index ef3ecb1265..ee28fac53a 100644
--- a/build-aux/Makefile.once.tail/00-dist.mk
+++ b/build-aux/Makefile.once.tail/00-dist.mk
@@ -15,14 +15,14 @@
_dist.copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2
_dist.addfile = $(call _dist.copyfile,$3,$2/$(call at.relto,$1,$3))
-$(topoutdir)/$(PACKAGE)-$(VERSION): $(std.src_files/$(topoutdir)) $(std.gen_files/$(topoutdir))
+$(topoutdir)/$(dist.name)-$(dist.version): $(std.src_files/$(topoutdir)) $(std.gen_files/$(topoutdir))
$(RM) -r $@
@PS4='' && set -x && \
$(MKDIR) $(@D)/tmp.$(@F).$$$$ && \
$(foreach f,$^,$(call _dist.addfile,$(topsrcdir),$(@D)/tmp.$(@F).$$$$,$f) &&) \
$(MV) $(@D)/tmp.$(@F).$$$$ $@ || $(RM) -r $(@D)/tmp.$(@F).$$$$
-$(topoutdir)/$(PACKAGE)-$(VERSION).tar: $(topoutdir)/$(PACKAGE)-$(VERSION)
+$(topoutdir)/$(dist.name)-$(dist.version).tar: $(topoutdir)/$(dist.name)-$(dist.version)
$(TAR) cf $@ -C $(<D) $(<F)
-$(topoutdir)/$(PACKAGE)-$(VERSION).tar.gz: $(topoutdir)/$(PACKAGE)-$(VERSION).tar
+$(topoutdir)/$(dist.name)-$(dist.version).tar.gz: $(topoutdir)/$(dist.name)-$(dist.version).tar
$(GZIP) $(GZIPFLAGS) < $< > $@