* [FFmpeg-devel] [PATCH] configure: Add a --disable-version-tracking option
@ 2023-12-15 12:52 Martin Storsjö
2023-12-20 8:12 ` Martin Storsjö
0 siblings, 1 reply; 3+ messages in thread
From: Martin Storsjö @ 2023-12-15 12:52 UTC (permalink / raw)
To: ffmpeg-devel
This disables regenerating ffversion.h whenever the checked out
git commit changes, speeding up development rebuilds.
Whenever this option is set, force the version to be printed as
"unknown" rather than showing potentially stale information.
---
Makefile | 7 ++++++-
configure | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 2fc3e538c1..dbc930270b 100644
--- a/Makefile
+++ b/Makefile
@@ -133,13 +133,18 @@ endif
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
VERSION_SH = $(SRC_PATH)/ffbuild/version.sh
+ifeq ($(VERSION_TRACKING),yes)
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
+endif
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) ffbuild/config.mak
.version: M=@
+ifneq ($(VERSION_TRACKING),yes)
+libavutil/ffversion.h .version: REVISION=unknown
+endif
libavutil/ffversion.h .version:
- $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
+ $(M)revision=$(REVISION) $(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
$(Q)touch .version
# force version.sh to run whenever version might have changed
diff --git a/configure b/configure
index 7d2ee66000..9911428213 100755
--- a/configure
+++ b/configure
@@ -504,6 +504,7 @@ Developer options (useful when working on FFmpeg itself):
--enable-macos-kperf enable macOS kperf (private) API
--disable-large-tests disable tests that use a large amount of memory
--disable-ptx-compression don't compress CUDA PTX code even when possible
+ --disable-version-tracking don't include the git/release version in the build
NOTE: Object files are built at the place where configure is launched.
EOF
@@ -2576,6 +2577,7 @@ CMDLINE_SELECT="
optimizations
rpath
stripping
+ version_tracking
"
PATHS_LIST="
@@ -3980,6 +3982,7 @@ enable $DOCUMENT_LIST
enable $EXAMPLE_LIST
enable $LIBRARY_LIST
enable stripping
+enable version_tracking
enable asm
enable debug
@@ -8013,6 +8016,7 @@ SAMPLES:=${samples:-\$(FATE_SAMPLES)}
NOREDZONE_FLAGS=$noredzone_flags
LIBFUZZER_PATH=$libfuzzer_path
IGNORE_TESTS=$ignore_tests
+VERSION_TRACKING=$version_tracking
EOF
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
--
2.39.3 (Apple Git-145)
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] configure: Add a --disable-version-tracking option
2023-12-15 12:52 [FFmpeg-devel] [PATCH] configure: Add a --disable-version-tracking option Martin Storsjö
@ 2023-12-20 8:12 ` Martin Storsjö
2023-12-20 9:46 ` Anton Khirnov
0 siblings, 1 reply; 3+ messages in thread
From: Martin Storsjö @ 2023-12-20 8:12 UTC (permalink / raw)
To: ffmpeg-devel
On Fri, 15 Dec 2023, Martin Storsjö wrote:
> This disables regenerating ffversion.h whenever the checked out
> git commit changes, speeding up development rebuilds.
>
> Whenever this option is set, force the version to be printed as
> "unknown" rather than showing potentially stale information.
> ---
> Makefile | 7 ++++++-
> configure | 4 ++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
Any comments on the name here, or does this seem fine? Otherwise I'd go
ahead with this in a day or two if there's no opposition to it.
// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] configure: Add a --disable-version-tracking option
2023-12-20 8:12 ` Martin Storsjö
@ 2023-12-20 9:46 ` Anton Khirnov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Khirnov @ 2023-12-20 9:46 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Martin Storsjö (2023-12-20 09:12:21)
> On Fri, 15 Dec 2023, Martin Storsjö wrote:
>
> > This disables regenerating ffversion.h whenever the checked out
> > git commit changes, speeding up development rebuilds.
> >
> > Whenever this option is set, force the version to be printed as
> > "unknown" rather than showing potentially stale information.
> > ---
> > Makefile | 7 ++++++-
> > configure | 4 ++++
> > 2 files changed, 10 insertions(+), 1 deletion(-)
>
> Any comments on the name here, or does this seem fine? Otherwise I'd go
> ahead with this in a day or two if there's no opposition to it.
I am fine with the name and the general idea.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-20 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-15 12:52 [FFmpeg-devel] [PATCH] configure: Add a --disable-version-tracking option Martin Storsjö
2023-12-20 8:12 ` Martin Storsjö
2023-12-20 9:46 ` Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git