Browse code

build: rename version.h to libavutil/ffversion.h

Also the libavutil/ffversion.h will be installed.

Rationale:
* Applications might want to know FFmpeg's version besides the individual
libraries'.
* Avoids file name clash between FFmpeg's ./version.h and lib*/version.h when
a library source file includes both and is compiled on an out-of-tree build.

Fixes #1769.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Timothy Gu authored on 2013/11/29 09:29:41
Showing 7 changed files
... ...
@@ -27,7 +27,6 @@
27 27
 /ffserver
28 28
 /config.*
29 29
 /coverage.info
30
-/version.h
31 30
 /doc/*.1
32 31
 /doc/*.3
33 32
 /doc/*.html
... ...
@@ -53,6 +52,7 @@
53 53
 /libavcodec/*_tables.c
54 54
 /libavcodec/*_tables.h
55 55
 /libavutil/avconfig.h
56
+/libavutil/ffversion.h
56 57
 /tests/audiogen
57 58
 /tests/base64
58 59
 /tests/data/
... ...
@@ -119,8 +119,8 @@ GIT_LOG     = $(SRC_PATH)/.git/logs/HEAD
119 119
 .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
120 120
 .version: M=@
121 121
 
122
-version.h .version:
123
-	$(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION)
122
+libavutil/ffversion.h .version:
123
+	$(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
124 124
 	$(Q)touch .version
125 125
 
126 126
 # force version.sh to run whenever version might have changed
... ...
@@ -163,7 +163,7 @@ clean::
163 163
 
164 164
 distclean::
165 165
 	$(RM) $(DISTCLEANSUFFIXES)
166
-	$(RM) config.* .config libavutil/avconfig.h .version version.h libavcodec/codec_names.h
166
+	$(RM) config.* .config libavutil/avconfig.h .version libavutil/ffversion.h libavcodec/codec_names.h
167 167
 
168 168
 config:
169 169
 	$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
... ...
@@ -49,8 +49,8 @@
49 49
 #include "libavutil/dict.h"
50 50
 #include "libavutil/opt.h"
51 51
 #include "libavutil/cpu.h"
52
+#include "libavutil/ffversion.h"
52 53
 #include "cmdutils.h"
53
-#include "version.h"
54 54
 #if CONFIG_NETWORK
55 55
 #include "libavformat/network.h"
56 56
 #endif
... ...
@@ -15,6 +15,10 @@ libavutil:     2012-10-22
15 15
 
16 16
 API changes, most recent first:
17 17
 
18
+2013-11-xx - xxxxxxx - lavu 52.56.100 - ffversion.h
19
+  Moves version.h to libavutil/ffversion.h.
20
+  Install ffversion.h and make it public.
21
+
18 22
 2013-11-xx - xxxxxxx- - lavu 52.19.0 - frame.h
19 23
   Add AV_FRAME_DATA_A53_CC value to the AVFrameSideDataType enum, which
20 24
   identifies ATSC A53 Part 4 Closed Captions data.
... ...
@@ -24,7 +24,7 @@
24 24
  */
25 25
 
26 26
 #include "config.h"
27
-#include "version.h"
27
+#include "libavutil/ffversion.h"
28 28
 
29 29
 #include <string.h>
30 30
 
... ...
@@ -62,7 +62,8 @@ ARCH_HEADERS = bswap.h                                                  \
62 62
                intreadwrite.h                                           \
63 63
                timer.h                                                  \
64 64
 
65
-BUILT_HEADERS = avconfig.h
65
+BUILT_HEADERS = avconfig.h                                              \
66
+                ffversion.h
66 67
 
67 68
 OBJS = adler32.o                                                        \
68 69
        aes.o                                                            \
... ...
@@ -75,7 +75,7 @@
75 75
  */
76 76
 
77 77
 #define LIBAVUTIL_VERSION_MAJOR  52
78
-#define LIBAVUTIL_VERSION_MINOR  55
78
+#define LIBAVUTIL_VERSION_MINOR  56
79 79
 #define LIBAVUTIL_VERSION_MICRO 100
80 80
 
81 81
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \