make-docs.sh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/sh
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. # SPDX-License-Identifier: curl
  23. #
  24. ###########################################################################
  25. #
  26. # Documentation build script for the OS/400.
  27. #
  28. SCRIPTDIR=$(dirname "${0}")
  29. . "${SCRIPTDIR}/initscript.sh"
  30. [ -n "${PASEPERL}" ] || exit 0 # Perl needed for doc build.
  31. cd "${TOPDIR}/docs" || exit 1
  32. [ -d "${IFSDIR}/docs" ] || mkdir "${IFSDIR}/docs"
  33. # Command line options.
  34. (
  35. cd cmdline-opts || exit 1
  36. MANPAGE=curl.1
  37. TEXTPAGE=curl.txt
  38. get_make_vars Makefile.inc
  39. rm -f "${IFSDIR}/docs/${MANPAGE}" "${IFSDIR}/docs/${TEXTPAGE}"
  40. # Prepare online manual.
  41. # shellcheck disable=SC2086
  42. ${PASEPERL} "${TOPDIR}/scripts/managen" -c 75 \
  43. listhelp ${DPAGES} > "${TOPDIR}/src/tool_listhelp.c"
  44. # Generate text manual and copy it to DB2.
  45. # shellcheck disable=SC2086
  46. ${PASEPERL} "${TOPDIR}/scripts/managen" -I "${TOPDIR}/include" \
  47. -c 75 ascii ${DPAGES} > "${IFSDIR}/docs/${TEXTPAGE}"
  48. MEMBER="${LIBIFSNAME}/DOCS.FILE/MANUAL.MBR"
  49. CMD="CPY OBJ('${IFSDIR}/docs/${TEXTPAGE}') TOOBJ('${MEMBER}')"
  50. CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
  51. CLcommand "${CMD}"
  52. # Man page is useless as OS/400 has no man command.
  53. # # shellcheck disable=SC2086
  54. # ${PASEPERL} "${TOPDIR}/scripts/managen" -I "${TOPDIR}/include" \
  55. # mainpage ${DPAGES} > "${IFSDIR}/docs/${MANPAGE}"
  56. )