Commits

Shlomi Fish committed 8b1ee8e

Add more.

Comments (0)

Files changed (2)

installer/CMakeLists.txt

 INCLUDE ("Common.cmake")
 
 # This is the equivalent to perform a "make dist"/"make distdir" etc.
-SET(CPACK_PACKAGE_NAME "wml")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Website Meta Language")
+SET(CPACK_PACKAGE_NAME "laetmp")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Latemp Offline Content Management System")
 SET(CPACK_PACKAGE_VENDOR "Shlomi Fish")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
 FOREACH (name "latemp-config" "latemp-setup")
     SET (source_script "${name}.pl")
     SET (SRC_NAME "${CMAKE_CURRENT_SOURCE_DIR}/${source_script}")
-    SET (TARGET_NAME "${CMAKE_CURRENT_BINARY_DIR}/${name}")
+    SET (DEST "${CMAKE_CURRENT_BINARY_DIR}/${name}")
     ADD_CUSTOM_COMMAND(
-        OUTPUT "${TARGET_NAME}"
+        OUTPUT "${DEST}"
         COMMAND "${PERL_EXECUTABLE}"
         ARGS "${CMAKE_SOURCE_DIR}/cmake/preprocess-prefix-and-version.pl"
             "--input" "${SRC_NAME}"
-            "--output" "${TARGET_NAME}"
+            "--output" "${DEST}"
             "--version" "${VERSION}"
             "--prefix" "${CMAKE_INSTALL_PREFIX}"
-            COMMAND chmod ARGS "a+x" "${TARGET_NAME}"
+            COMMAND chmod ARGS "a+x" "${DEST}"
         DEPENDS "${SRC_NAME}"
     )
     SET (TARGET "${name}_preproc")
     # The custom command needs to be assigned to a target.
     ADD_CUSTOM_TARGET(
         "${TARGET}" ALL
-        DEPENDS "${TARGET_NAME}"
+        DEPENDS "${DEST}"
     )
     INSTALL(
-        PROGRAMS "${TARGET_NAME}"
+        PROGRAMS "${DEST}"
         DESTINATION "bin"
     )
 ENDFOREACH (name)
     "css-zen-garden"
 )
 
+# Build the document:
+IF (1)
+    SET (basename "latemp-ref")
+    SET (pod "${basename}.pod")
+    SET (html "${basename}.html")
+    SET (SRC "${CMAKE_CURRENT_SOURCE_DIR}/docs/${pod}")
+    SET (DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/docs/")
+    SET (DEST "${DEST_DIR}/${html}")
+
+    FILE (MAKE_DIRECTORY "${DEST_DIR}")
+    ADD_CUSTOM_COMMAND(
+        OUTPUT "${DEST}"
+        COMMAND "${PERL_EXECUTABLE}"
+        ARGS "${CMAKE_SOURCE_DIR}/docs/render.pl"
+            "${SRC}" "${DEST}"
+        DEPENDS "${SRC}"
+    )
+
+    SET (TARGET "${basename}_preproc")
+    # The custom command needs to be assigned to a target.
+    ADD_CUSTOM_TARGET(
+        "${TARGET}" ALL
+        DEPENDS "${DEST}"
+    )
+
+    INSTALL (
+        FILES
+            "${DEST}"
+            "${SRC}"
+        DESTINATION
+            "share/doc/${CPACK_PACKAGE_NAME}"
+    )
+
+ENDIF (1)
+
+INSTALL(
+    PROGRAMS "${DEST}"
+    DESTINATION "bin"
+)
 FOREACH (theme ${THEMES})
     INSTALL (
         FILES "${CMAKE_CURRENT_SOURCE_DIR}/wml/latemp/themes/${theme}/template.wml"

installer/docs/render.pl

 
 use Pod::Xhtml;
 
+my ($input_pod, $output_xhtml) = @ARGV;
+
 my $parser = Pod::Xhtml->new(FragmentOnly => 1);
-open my $in, "<", "latemp-ref.pod";
-open my $out, ">", "latemp-ref.html";
+open my $in, "<", $input_pod;
+open my $out, ">", $output_xhtml;
 print {$out} <<'EOF';
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE html
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.