[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 97/205: cmake: build manual pages (including curl.1
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 97/205: cmake: build manual pages (including curl.1) |
Date: |
Thu, 20 Apr 2017 16:20:37 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit 84a226a30b2d43f8fb0da996152a8376f1e21d8e
Author: Peter Wu <address@hidden>
AuthorDate: Sat Feb 25 14:40:24 2017 +0100
cmake: build manual pages (including curl.1)
Also make Perl mandatory to allow building the docs.
While CMakeLists.txt could probably read the list of manual pages from
Makefile.am, actually putting those in CMakeLists.txt is cleaner so that
is what is done here.
Fixes #1230
Ref: https://github.com/curl/curl/pull/1288
---
CMakeLists.txt | 3 +++
docs/CMakeLists.txt | 3 +++
docs/cmdline-opts/CMakeLists.txt | 12 ++++++++++++
src/CMakeLists.txt | 12 ++++++------
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8390c38c9..58d159e2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,6 +224,8 @@ if(ENABLE_MANUAL)
message(WARNING "Found no *nroff program")
endif()
endif()
+# Required for building manual, docs, tests
+find_package(Perl REQUIRED)
# We need ansi c-flags, especially on HP
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
@@ -1082,6 +1084,7 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
endfunction()
+add_subdirectory(docs)
add_subdirectory(lib)
if(BUILD_CURL_EXE)
add_subdirectory(src)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
new file mode 100644
index 000000000..4b111b85a
--- /dev/null
+++ b/docs/CMakeLists.txt
@@ -0,0 +1,3 @@
+#add_subdirectory(examples)
+#add_subdirectory(libcurl)
+add_subdirectory(cmdline-opts)
diff --git a/docs/cmdline-opts/CMakeLists.txt b/docs/cmdline-opts/CMakeLists.txt
new file mode 100644
index 000000000..ccee4a142
--- /dev/null
+++ b/docs/cmdline-opts/CMakeLists.txt
@@ -0,0 +1,12 @@
+set(MANPAGE "${CMAKE_BINARY_DIR}/docs/curl.1")
+
+# Load DPAGES and OTHERPAGES from shared file
+transform_makefile_inc("Makefile.inc"
"${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+
+add_custom_command(OUTPUT "${MANPAGE}"
+ COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/gen.pl" mainpage
"${CMAKE_CURRENT_SOURCE_DIR}" > "${MANPAGE}"
+ DEPENDS "${DPAGES}" "${OTHERPAGES}"
+ VERBATIM
+)
+add_custom_target(generate-curl.1 DEPENDS "${MANPAGE}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9bbeb6054..e6004ceae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,6 @@
set(EXE_NAME curl)
if(USE_MANUAL)
- find_package(Perl REQUIRED)
# Use the C locale to ensure that only ASCII characters appear in the
# embedded text. NROFF and MANOPT are set in the parent CMakeLists.txt
add_custom_command(
@@ -9,18 +8,19 @@ if(USE_MANUAL)
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" >
tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c
COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
- "${CURL_SOURCE_DIR}/docs/curl.1" |
- "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
+ "${CURL_BINARY_DIR}/docs/curl.1" |
+ "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
"${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "#else" >> tool_hugehelp.c
COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
- "${CURL_SOURCE_DIR}/docs/curl.1" |
- "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c
+ "${CURL_BINARY_DIR}/docs/curl.1" |
+ "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c
"${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >>
tool_hugehelp.c
DEPENDS
"${CURL_SOURCE_DIR}/docs/MANUAL"
- "${CURL_SOURCE_DIR}/docs/curl.1"
+ generate-curl.1
+ "${CURL_BINARY_DIR}/docs/curl.1"
"${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
"${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
VERBATIM)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 161/205: tool_operate: fix MinGW compiler warning, (continued)
- [GNUnet-SVN] [gnurl] 161/205: tool_operate: fix MinGW compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 179/205: libcurl-thread.3: fixed a bad macro that caused test 1140 to fail, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 184/205: polarssl: unbreak build with versions < 1.3.8, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 185/205: system.h: fix mingw section, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 137/205: cmake: fix build with cmake 2.8.12.2, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 192/205: RELEASE-NOTES: synced with 1451271e0, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 134/205: curl: fix callback functions to match prototype, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 175/205: INSTALL.md: fix secure transport configure arguments, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 168/205: test1606: verify speedcheck, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 128/205: cmake: add more missing files to the dist, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 97/205: cmake: build manual pages (including curl.1),
gnunet <=
- [GNUnet-SVN] [gnurl] 106/205: openssl: fall back on SSL_ERROR_* string when no error detail, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 136/205: ssh: fix narrowing conversion warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 141/205: CTestConfig.cmake: removed, unused, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 139/205: docs/index.html: removed, was not shipped anyway, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 173/205: BUGS: "Bugs in old versions", gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 158/205: tests: added test for Curl_splaygetbest to unit1309, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 146/205: tests/server/util: remove in6addr_any for recent MinGW, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 165/205: nss: fix build after e60fe20fdf94e829ba5fce33f7a9d6c281149f7d, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 187/205: tests/server/util: prefer <poll.h> over <sys/poll.h>, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 153/205: RELEASE-NOTES: synced with 4f2e348f9b42c69c480, gnunet, 2017/04/20