Merge remote-tracking branch 'origin/master' into 0.11
[platform/upstream/gst-common.git] / gtk-doc-plugins.mak
index 1a0b7dc..8cc42e7 100644 (file)
@@ -108,11 +108,7 @@ scanobj-update:
 
 # gstdoc-scanobj produces 5 output files (.new)
 # scangobj-merge.py merges them into the file which we commit later
-# TODO: scangobj-merge.py only merges signals and args
-#  - for interfaces and prerequisites do:
-#    'sort -du file file.new' and update file if changed
-#  - do that either in gstdoc-scanobj (which we change already) or in
-#    scangobj-merge.py
+# TODO: also merge the hierarchy
 scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles)
        @echo "  DOC   Introspecting gobjects"
        @if test x"$(srcdir)" != x. ; then                              \
@@ -149,10 +145,20 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp
 ### scan headers; done on every build ###
 scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
        @echo '  DOC   Scanning header files'
-       @gtkdoc-scan                                                    \
+       @if test x"$(srcdir)" != x. ; then                              \
+           for f in $(SCANOBJ_FILES) $(SCAN_FILES);                    \
+           do                                                          \
+               if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi;      \
+           done;                                                       \
+       fi
+       @_source_dir='' ;                                               \
+       for i in $(DOC_SOURCE_DIR) ; do                                 \
+           _source_dir="$${_source_dir} --source-dir=$$i" ;            \
+       done ;                                                          \
+       gtkdoc-scan                                                     \
            $(SCAN_OPTIONS) $(EXTRA_HFILES)                             \
            --module=$(DOC_MODULE)                                      \
-           --source-dir=$(DOC_SOURCE_DIR)                              \
+           $${_source_dir}                                             \
            --ignore-headers="$(IGNORE_HFILES)";                        \
        touch scan-build.stamp