Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon <ron@debian.org>2013-05-10 20:35:24 +0400
committerRon <ron@debian.org>2013-05-10 20:35:24 +0400
commit2f2f9d63b84d0eacdf66c03b683b932b367b017e (patch)
tree7d2a13bfd7813ca729133b6d8e354423b7fca3cb /Makefile.unix
parent80c4834c4822a9be4cb26ca2a11697a6a5b44485 (diff)
Fully automate version updating
This one meets or exceeds the following requirements: - Version is checked/updated for every build action when in the git repo. Does not require the user to re- ./configure to get the correct version. - Version is not updated automatically when using exported tarball source. Avoids accidentally getting a wrong version from some other git repo in a parent directory of the source, and allows setting the correct version for distro package exports. - Automatic updating can be manually suppressed. For developers doing lots of change/rebuild cycles they don't plan to release, when they don't want a full rebuild triggered for every commit, and again for every change made immediately after a commit. The version will still always be updated if they do a `make dist`. - Does not require any manual updating of versions in the mainline git repo for each release aside from normal tagging. The version is recorded in one file only, that is automatically generated and will never need to be committed. - Does not require gnu-make features for the autoconf builds. It does not currently: - Keep a checksum of every source file in tarball releases to mangle the version if people modify the tarball source. Responsible people can manually update the version easily though in such cases. The version.mk file is now only used by the VC project files. Once they are updated to use the package_version file too, then it can be deleted from the repository.
Diffstat (limited to 'Makefile.unix')
-rw-r--r--Makefile.unix12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.unix b/Makefile.unix
index bd980c60..619dea7e 100644
--- a/Makefile.unix
+++ b/Makefile.unix
@@ -20,8 +20,8 @@ CFLAGS := -Drestrict= $(CFLAGS)
###################### END OF OPTIONS ######################
-include version.mk
-CFLAGS += -DOPUS_VERSION='$(OPUS_VERSION)'
+-include package_version
+
include silk_sources.mk
include celt_sources.mk
include opus_sources.mk
@@ -124,5 +124,13 @@ opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET)
opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS)
$(LINK.o.cmdline)
+celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)'
+celt/celt.o: package_version
+
+package_version: force
+ @./update_version || true
+
+force:
+
clean:
rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) $(OBJS) $(OPUSDEMO_OBJS)