1. Shlomi Fish
  2. Website Meta Language

Commits

shl...@7081e830-ea04-0410-ae62-fb6148e2d9db  committed 13e58c4

Added support for pod2man.

  • Participants
  • Parent commits aa1d136
  • Branches conversion-to-cmake

Comments (0)

Files changed (3)

File src/Common.cmake

View file
         DEPENDS ${DEST}
     )
 ENDMACRO(PREPROCESS_PATH_PERL)
+
+MACRO(RUN_POD2MAN SOURCE DEST SECTION CENTER RELEASE)
+    SET(PATH_PERL ${PERL_EXECUTABLE})
+    ADD_CUSTOM_COMMAND(
+        OUTPUT ${DEST}
+        COMMAND ${PATH_PERL} 
+        ARGS "-e" 
+        "my (\$src, \$dest, \$sect, \$center, \$release) = @ARGV; my \$pod = qq{Hoola.pod}; use File::Copy; copy(\$src, \$pod); system(qq{pod2man --section=\$sect --center=\"\$center\" --release=\"\$release\" \$pod > \$dest}); unlink(\$pod)"
+        ${SOURCE}
+        ${DEST}
+        ${SECTION}
+        "${CENTER}"
+        "${RELEASE}"
+        DEPENDS ${SOURCE}
+        VERBATIM
+    )
+    # The custom command needs to be assigned to a target.
+    ADD_CUSTOM_TARGET(
+        process_pod ALL
+        DEPENDS ${DEST}
+    )
+ENDMACRO(RUN_POD2MAN)

File src/wml_backend/p1_ipp/CMakeLists.txt

View file
 include("../../Common.cmake")
 
 PREPROCESS_PATH_PERL("ipp.src" "ipp.pl")
+RUN_POD2MAN("ipp.src" "ipp.1" "1" "EN Tools" "EN Tools")

File src/wml_backend/p5_divert/CMakeLists.txt

View file
+SET(CMAKE_VERBOSE_MAKEFILE ON)
+include("../../Common.cmake")
+
+PREPROCESS_PATH_PERL("divert.src" "divert.pl")
+RUN_POD2MAN("divert.src" "divert.1" "1" "EN Tools" "EN Tools")