]> git.saurik.com Git - wxWidgets.git/blobdiff - debian/rules
compilation fix after last change
[wxWidgets.git] / debian / rules
index 200fbb98769b2e4b01b2c6e48a117f0aaeac614e..8c89fd845b363b871dd1534893560f2449805f96 100755 (executable)
@@ -56,7 +56,14 @@ endif
 # to correctly set the release below.
 DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@')
 
-release   := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
+
+wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' configure.in)
+wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
+wx_release_number       := $(shell sed -n 's/^wx_release_number=//p' configure.in)
+wx_subrelease_number    := $(shell sed -n 's/^wx_subrelease_number=//p' configure.in)
+
+##release   := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
+release  := $(wx_major_version_number).$(wx_minor_version_number)
 
 # This is broken completely now by bakefiles changes.  Until we add
 # some hocus pocus to the main tree, to export these values from it
@@ -73,7 +80,7 @@ sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBI
 # are supposed to be compatible), this variable contains the appropriate value
 ifeq ($(shell echo `echo $(release) | sed 's/.\+\.\(.\+\)/\1/'`%2 | bc),1)
     # development release
-    compatible_release := $(release).$(soversion)
+    compatible_release := $(release).$(wx_release_number)
 else
     compatible_release := $(release)
 endif
@@ -105,7 +112,6 @@ BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
 
 GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
     --with-gtk \
-    --with-gnomeprint \
     --enable-mediactrl \
     --enable-sound \
     --with-sdl \
@@ -463,20 +469,29 @@ build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py
 
 build-doc-stamp: build-gtk-shared-stamp
        dh_testdir
-       cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE)
-       rm -rf $(objdir_doc)
-       rm -rf $(objdir_doc_cruft)
-       mkdir $(objdir_doc)
-       mkdir $(objdir_doc_cruft)
-       cd $(objdir_doc_cruft) \
-               && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
-                  ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf              \
-                  ../docs/latex/wx/manual.tex                                    \
-                  ../$(objdir_doc)/wx$(release)-manual.html                      \
-                  -twice -html
-       cp docs/latex/wx/*.gif $(objdir_doc)
-       rm -rf $(objdir_doc_cruft)
-       rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}
+       # the tarball may already have the generated docs in it
+       if [ ! -e docs/html/wx/index.html ]; then \
+               cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE); \
+               cd -; \
+               rm -rf $(objdir_doc); \
+               rm -rf $(objdir_doc_cruft); \
+               mkdir $(objdir_doc); \
+               mkdir $(objdir_doc_cruft); \
+               cd $(objdir_doc_cruft); \
+               LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
+                  ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf           \
+                  ../docs/latex/wx/manual.tex                                 \
+                  ../$(objdir_doc)/wx$(release)-manual.html                   \
+                  -twice -html;                                               \
+               cd -; \
+               cp docs/latex/wx/*.gif $(objdir_doc); \
+               rm -rf $(objdir_doc_cruft); \
+               rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}; \
+       else \
+               mkdir $(objdir_doc); \
+               cp docs/html/wx/* $(objdir_doc); \
+               mv $(objdir_doc)/index.html $(objdir_doc)/wx-$(release)-manual_contents.html; \
+       fi
        touch $@
 
 build-examples-stamp: build-gtk-shared-stamp