Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=e99abe9f52bd951ff9a5cc7fd6ccba4a0d3b6d38

commit e99abe9f52bd951ff9a5cc7fd6ccba4a0d3b6d38
Author: Marius Cirsta <[email protected]>
Date:   Wed Jan 15 17:07:29 2014 +0200

* check for po4a
* check if man txt file exist

diff --git a/autogen.sh b/autogen.sh
index e521c47..cde8c35 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -49,7 +49,6 @@ if [ "$1" == "--dist" ]; then
rm -rf pacman-g2-$ver
git archive --format=tar --prefix=pacman-g2-$ver/ HEAD | tar xf -
git log --no-merges |git name-rev --tags --stdin > pacman-g2-$ver/ChangeLog
-       mkdir pacman-g2-$ver
cd pacman-g2-$ver
# copy in the po files
import_pootle
diff --git a/cmake_modules/UseAsciidoc.cmake b/cmake_modules/UseAsciidoc.cmake
index 3b49104..dad3473 100644
--- a/cmake_modules/UseAsciidoc.cmake
+++ b/cmake_modules/UseAsciidoc.cmake
@@ -28,18 +28,20 @@ endmacro(ASCIIDOC2MAN _a2m_input _a2m_output 
_a2m_install_dir)

macro(ASCIILOCALDOC2MAN _a2m_input _a2m_output _a2m_install_dir _lang)

-   set(_manFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_a2m_output})
-   add_custom_command(OUTPUT ${_manFile}
-       COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${_lang}
-       COMMAND ${ASCIIDOC_A2X_EXECUTABLE} -D 
${CMAKE_CURRENT_BINARY_DIR}/${_lang} -f manpage 
${CMAKE_CURRENT_SOURCE_DIR}/local_mans/${_lang}/${_a2m_input}
-       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-       DEPENDS ${_a2m_input}
-   )
+   IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/local_mans/${_lang}/${_a2m_input}")
+      set(_manFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_a2m_output})
+      add_custom_command(OUTPUT ${_manFile}
+       COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${_lang}
+       COMMAND ${ASCIIDOC_A2X_EXECUTABLE} -D 
${CMAKE_CURRENT_BINARY_DIR}/${_lang} -f manpage 
${CMAKE_CURRENT_SOURCE_DIR}/local_mans/${_lang}/${_a2m_input}
+       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+       DEPENDS ${_a2m_input}
+      )

-   string(REGEX REPLACE "/" "." no_slash_dir ${_a2m_install_dir})
+      string(REGEX REPLACE "/" "." no_slash_dir ${_a2m_install_dir})

-   add_custom_target(${no_slash_dir}${_lang}${_a2m_output} ALL DEPENDS 
${_manFile})
+      add_custom_target(${no_slash_dir}${_lang}${_a2m_output} ALL DEPENDS 
${_manFile})

-   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_a2m_output} 
DESTINATION ${_a2m_install_dir})
+      install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_a2m_output} 
DESTINATION ${_a2m_install_dir})
+   ENDIF(EXISTS 
"${CMAKE_CURRENT_SOURCE_DIR}/local_mans/${_lang}/${_a2m_input}")

endmacro(ASCIILOCALDOC2MAN _a2m_input _a2m_output _a2m_install_dir _lang)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index dec18af..350990e 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -20,4 +20,6 @@ if(HAS_PO4A)
ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po/LINGUAS")
message(WARNING "file LINGUAS not present")
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po/LINGUAS")
+else(HAS_PO4A)
+  message(WARNING "PO4A is missing, cannot build localized man pages")
endif(HAS_PO4A)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to