summaryrefslogtreecommitdiff
path: root/build-aux
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
commit37b88c702ebe46611435f528b087d82c53dfcc77 (patch)
treee36623f4e18cfa304f35debc32ae7ba8c390466c /build-aux
parentcbe8694c76ea68d56073ffe3e74359a5db4d997a (diff)
rename PACKAGE->dist.name VERSION->dist.version
Diffstat (limited to 'build-aux')
-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 6e6a5cb..d85ecc0 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 98fc6b3..6a54b7d 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 ef3ecb1..ee28fac 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) < $< > $@