]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Properly track dependencies.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 17 Feb 2016 03:19:23 +0000 (21:19 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 17 Feb 2016 03:22:49 +0000 (21:22 -0600)
doc/doxygen/code-gallery/CMakeLists.txt

index 9c3048782214f1d2849fc7c5e421794a2a6322f0..dd3f7317615d41479c432e88f9bd9bc8f4e7fc3a 100644 (file)
@@ -49,7 +49,13 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md)
     LIST(APPEND _code_gallery_names_sans_dir "${_step}")
   ENDFOREACH()
 
-  # Describe how to build code-gallery.h:
+  # Describe how to build code-gallery.h. Make sure we properly
+  # track dependencies on the input files, by assuming that the PERL
+  # script is going to read all of the files in the doc/ subdirectories
+  FILE(GLOB _code_gallery_h_deps
+       "${DEAL_II_CODE_GALLERY_DIRECTORY}/*/doc/*")
+  STRING(REPLACE "//" "/" _code_gallery_h_deps "${_code_gallery_h_deps}")
+
   ADD_CUSTOM_COMMAND(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h
     COMMAND ${PERL_EXECUTABLE}
@@ -62,10 +68,12 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md)
     DEPENDS
       ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/code-gallery.pl
       ${CMAKE_CURRENT_SOURCE_DIR}/code-gallery.h.in
-      ${_code_gallery_names}
+      ${_code_gallery_h_deps}
     )
   ADD_CUSTOM_TARGET(build_code-gallery_h
-    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h)
+    DEPENDS 
+      ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h
+      ${_code_gallery_h_deps})
   ADD_DEPENDENCIES(code-gallery build_code-gallery_h)
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.