summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-04-01 21:01:48 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-04-02 23:12:28 +0200
commitc88c8f5d169e2493ad1fed72204c65043b5e67c2 (patch)
treeca9c08bb9e572415e3cb9c51105084eda76a4e52 /Makefile.in
parent67777899db111e0b721b96cff1b53c3d4158e0ee (diff)
downloadptxdist-c88c8f5d169e2493ad1fed72204c65043b5e67c2.tar.gz
ptxdist-c88c8f5d169e2493ad1fed72204c65043b5e67c2.tar.xz
[ptxdist] rework version generation
This patch aims to fix some problems of the version handling of ptxdist which were introducted with switching to timed releases: a) The version is specified in "configure.ac", the "local version" ("00003-gbf29f16") is generated by "setlocalversion". "setlocalversion" generates it's ouput relative to the latest tag. This leads to strange version strings, after creating a tag, and forgetting to run "./autogen.sh && ./configure && make". b) The ptxdist created with a "make dist", even if a not tagged version, always thinks it's a release. c) BSPs working with "master" need a migrate after each release. Because the compatibility checker uses year and month. The problems are^Wshould be fixed with these changes: a) "setlocalversion" now generates the whole full version, e.g.: "2010.04.0-00003-gbf29f16". "configure.ac" uses "m4_esyscmd" to figure out the current version while running "configure". (Yes, "configure"). b) A file ".tarball-version" is added to the tarball to track the version while creating the tarball (same goes for the installation). "setlocalversion" will use the version information from ".tarball-version" c) If both ptxdist and config file are not using a release, i.e. their versions an "appendix", we say it's compatibe, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in33
1 files changed, 23 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index 881e20000..d5f724e92 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -35,11 +35,21 @@ all:
@echo "done."
@touch .done
-install: all
+clean:
+ @rm -f .done
+ @$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
+
+dirty-check:
+ @case "$(version)" in \
+ *-dirty) echo "refusing to install or package a dirty git tree!" ; exit 1 ;; \
+ esac
+
+install: all dirty-check
@echo "installing PTXdist to $(DESTDIR)$(prefix)..."
@rm -fr "$(DESTDIR)$(instdir)"
@mkdir -p "$(DESTDIR)$(instdir)"
- @tar -C $(abs_srcdir) -cf - \
+ @tar -C "$(abs_srcdir)" -cf - \
+ --exclude *~ \
--exclude .git \
--exclude .pc \
--exclude .svn \
@@ -50,7 +60,9 @@ install: all
--exclude state \
. | \
tar -o -C "$(DESTDIR)$(instdir)" -xvf -
-
+ @if [ \! -e "$(DESTDIR)$(instdir)/.tarball-version" ]; then \
+ echo -n "${version}" > "$(DESTDIR)$(instdir)/.tarball-version"; \
+ fi
@mkdir -p "$(DESTDIR)$(bindir)"
@rm -f "$(DESTDIR)$(bindir)/ptxdist"
@ln -sf "$(instdir)/bin/ptxdist" "$(DESTDIR)$(bindir)/ptxdist-$(version)"
@@ -60,27 +72,28 @@ install: all
cp scripts/bash_completion "$(DESTDIR)@BASH_COMPLETION_DIR@/ptxdist"; \
fi
-clean:
- @rm -f .done
- @$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
-dist:
+dist: dirty-check
@rm -rf "$(project)"
- git archive "$(project)" --prefix="$(project)"/ | tar x
+ @git archive "$(project)" --prefix="$(project)"/ | tar x
+
+ echo -n "${version}" > "${project}/.tarball-version"
cd "$(project)" && ./autogen.sh
+
tar -cz \
- --exclude ".svn" \
--exclude ".git" \
--exclude ".pc" \
+ --exclude ".svn" \
--exclude "$(project)/autom4te.cache" \
--exclude "$(project)/patches" \
-f "$(project).tgz" \
"$(project)"
md5sum "$(project).tgz" > "$(project).tgz.md5"
+
tar -cz \
- --exclude ".svn" \
--exclude ".git" \
--exclude ".pc" \
+ --exclude ".svn" \
--exclude "$(project)/autom4te.cache" \
-f "$(project)-patches.tgz" \
"$(project)/patches"