Browse code

autobuild doc if possible patch by (Nicolas Boos <nicolas.boos at wanadoo dot fr>)

Originally committed as revision 3288 to svn://svn.ffmpeg.org/ffmpeg/trunk

Nicolas Boos authored on 2004/07/06 03:06:16
Showing 2 changed files
... ...
@@ -70,11 +70,15 @@ else
70 70
 TEST=test
71 71
 endif
72 72
 
73
+ifeq ($(BUILD_DOC),yes)
74
+DOC=documentation
75
+endif
76
+
73 77
 OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o
74 78
 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
75 79
 FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec
76 80
 
77
-all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART)
81
+all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
78 82
 
79 83
 lib:
80 84
 	$(MAKE) -C libavcodec all
... ...
@@ -112,6 +116,9 @@ ffplay.o: ffplay.c
112 112
 videohook: .libs
113 113
 	$(MAKE) -C vhook all
114 114
 
115
+documentation:
116
+	$(MAKE) -C doc all
117
+
115 118
 .PHONY: install
116 119
 
117 120
 install: all install-man $(INSTALLVHOOK)
... ...
@@ -900,6 +900,14 @@ fi
900 900
 fi
901 901
 fi
902 902
 
903
+##########################################
904
+# texi2html probe
905
+
906
+texi2html=no
907
+if texi2html -version >/dev/null 2>&1; then
908
+texi2html=yes
909
+fi
910
+
903 911
 case "`$cc -v 2>&1 | grep version`" in
904 912
     *gcc*)
905 913
 	CFLAGS="-Wall $CFLAGS"
... ...
@@ -1123,6 +1131,9 @@ if test "$sdl" = "yes" ; then
1123 1123
   echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1124 1124
   echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1125 1125
 fi
1126
+if test "$texi2html" = "yes"; then
1127
+  echo "BUILD_DOC=yes" >> config.mak
1128
+fi
1126 1129
 if test "$have_lrintf" = "yes" ; then
1127 1130
   echo "#define HAVE_LRINTF 1" >> $TMPH
1128 1131
 fi