Shlomi Fish avatar Shlomi Fish committed 302cd2c

[CMake] Refactoring: always use POD2MAN_TARGET_IS_A_LIST.

Comments (0)

Files changed (8)

     )
 ENDMACRO(ADD_COPY_TARGET)
 
-MACRO(RUN_POD2MAN TARGET_NAME BASE_SOURCE BASE_DEST SECTION CENTER RELEASE)
+MACRO(RUN_POD2MAN TARGET_DESTS_VARNAME BASE_SOURCE BASE_DEST SECTION CENTER RELEASE)
     SET (DEST "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
     IF (POD2MAN_SOURCE_IS_IN_BINARY)
         SET (SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${BASE_SOURCE}")
         VERBATIM
     )
     # The custom command needs to be assigned to a target.
-    IF (POD2MAN_TARGET_IS_A_LIST)
-        LIST(APPEND "${TARGET_NAME}" "${DEST}")
-    ELSE (POD2MAN_TARGET_IS_A_LIST)
-        ADD_CUSTOM_TARGET(
-            ${TARGET_NAME} ALL
-            DEPENDS ${DEST}
-        )
-    ENDIF (POD2MAN_TARGET_IS_A_LIST)
+    LIST(APPEND "${TARGET_DESTS_VARNAME}" "${DEST}")
 ENDMACRO(RUN_POD2MAN)
 
 MACRO(SIMPLE_POD2MAN TARGET_NAME SOURCE DEST SECTION)
 
 MACRO(DEFINE_WML_AUX_PERL_PROG BASENAME)
     DEFINE_WML_AUX_PERL_PROG_WITHOUT_MAN("${BASENAME}")
-    SET (POD2MAN_TARGET_IS_A_LIST 1)
     SET (aux_pod_dests )
     RUN_POD2MAN("aux_pod_dests" "${BASENAME}.src" "${BASENAME}.1" "1" "EN  Tools" "En Tools")
     INSTALL_RENAME_MAN ("${BASENAME}.1" 1 "wml_aux_${BASENAME}" "${CMAKE_CURRENT_BINARY_DIR}")
-    SET (POD2MAN_TARGET_IS_A_LIST )
     ADD_CUSTOM_TARGET(
         "pod_${BASENAME}" ALL
         DEPENDS ${aux_pod_dests}
     PREPROCESS_PATH_PERL(
         "${BASENAME}_preproc" "${BASENAME}.src" "${BASENAME}.pl"
     )
-    SET (POD2MAN_TARGET_IS_A_LIST 1)
     SET (perl_backend_pod_tests )
     INST_RENAME_POD2MAN(
         "perl_backend_pod_tests" "${BASENAME}.src" "${BASENAME}" "1"
         "${DEST_BASENAME}"
     )
-    SET (POD2MAN_TARGET_IS_A_LIST)
     ADD_CUSTOM_TARGET(
         "${BASENAME}_pod" ALL
         DEPENDS ${perl_backend_pod_tests}

src/wml_aux/iselect/CMakeLists.txt

 
 INCLUDE_DIRECTORIES( BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
 
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 SET (pod_dests )
 SIMPLE_POD2MAN(
     "pod_dests"
     "1"
 )
 
-SET (POD2MAN_TARGET_IS_A_LIST )
-
 ADD_CUSTOM_TARGET(
     "wml_aux_iselect" ALL
     DEPENDS ${pod_dests}

src/wml_backend/p2_mp4h/doc/CMakeLists.txt

 
 SET (POD2MAN_SOURCE_IS_IN_BINARY 1)
 SET (mp4h_pod_dests )
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 INST_RENAME_POD2MAN( "mp4h_pod_dests" "mp4h.pod" "mp4h" "1" "mp4h")
-SET (POD2MAN_TARGET_IS_A_LIST )
 ADD_CUSTOM_TARGET(
     "mp4h_pod" ALL
     DEPENDS ${mp4h_pod_dests}

src/wml_backend/p3_eperl/CMakeLists.txt

 )
 
 SET (POD2MAN_SOURCE_IS_IN_BINARY 1)
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 SET (eperl_pods )
 INST_RENAME_POD2MAN( "eperl_pods" "eperl.pod" "eperl" "1" "wml_p3_eperl")
 SET (POD2MAN_TARGET_IS_A_LIST)

src/wml_backend/p9_slice/CMakeLists.txt

 SET(INST_BASE "wml_p9_${BASENAME}")
 
 SET (POD2MAN_SOURCE_IS_IN_BINARY 1)
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 SET (pod_dests )
 INST_RENAME_POD2MAN(
     "pod_dests" "${destbase}" "${BASENAME}" "1" "${INST_BASE}"
 )
-SET (POD2MAN_TARGET_IS_A_LIST )
 
 ADD_CUSTOM_TARGET(
     "${BASENAME}_pod" ALL

src/wml_docs/CMakeLists.txt

     DEPENDS ${TAGS_POD}
 )
 
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 SET (pod_dests )
 
 FOREACH(MYDOC ${WML_DOCS})
     INST_POD2MAN("pod_dests" "${POD_SRC}" "${MAN_LOCAL}" "7")
 ENDFOREACH(MYDOC ${WML_DOCS})
 
-SET (POD2MAN_TARGET_IS_A_LIST )
-
 ADD_CUSTOM_TARGET(
     "docs_pods" ALL
     DEPENDS ${pod_dests}

src/wml_frontend/CMakeLists.txt

     SET (manname "${CMAKE_CURRENT_BINARY_DIR}/${mannamebase}")
 ENDMACRO(set_vars)
 
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 SET (pod_dests )
 
 FOREACH (cmd wmk wml wmb wmd wmu)
     INST_POD2MAN("pod_dests" "${srcbase}" "${mannamebase}" "1")
 ENDFOREACH(cmd)
 
-SET (POD2MAN_TARGET_IS_A_LIST )
-
 ADD_CUSTOM_TARGET(
     "frontend_pods" ALL
     DEPENDS ${pod_dests}

src/wml_include/CMakeLists.txt

 SET (dirs_to_make )
 SET (preproc_target_dests )
 SET (include_pods_dests )
-SET (POD2MAN_TARGET_IS_A_LIST 1)
 
 FOREACH (base ${myfiles})
 
     )
 ENDFOREACH(base)
 
-SET (POD2MAN_TARGET_IS_A_LIST )
-
 ADD_CUSTOM_TARGET(
     "preprocess_perl_includes" ALL
     DEPENDS ${preproc_target_dests}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.