llvm.org GIT mirror llvm / 4c841fd
[autoconf] Refine doxygen document options. This CL adds --enable-doxygen-search to enable doxygen search engine and --enable-doxygen-qt-help to enable the Qt help file generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232062 91177308-0d34-0410-b5e6-96231b3b80d8 Logan Chien 4 years ago
2 changed file(s) with 141 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
800800 enableval=default)
801801 case "$enableval" in
802802 yes) AC_SUBST(ENABLE_DOXYGEN,[1]) ;;
803 no) AC_SUBST(ENABLE_DOXYGEN,[0]) ;;
804 default) AC_SUBST(ENABLE_DOXYGEN,[0]) ;;
803 no|default) AC_SUBST(ENABLE_DOXYGEN,[0]) ;;
805804 *) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;;
805 esac
806
807 dnl Allow enablement of doxygen search engine
808 AC_ARG_ENABLE(doxygen-search,
809 AS_HELP_STRING([--enable-doxygen-search],
810 [Enable doxygen search support (default is NO)]),,
811 enableval=default)
812 ENABLE_DOXYGEN_SEARCH="$enableval"
813
814 case "$enableval" in
815 yes|no|default) ;;
816 *) AC_MSG_ERROR([Invalid setting for --enable-doxygen-search. Use "yes" or "no"]) ;;
817 esac
818
819 AC_ARG_ENABLE(doxygen-external-search,
820 AS_HELP_STRING([--enable-doxygen-external-search],
821 [Enable doxygen exteranl search (default is NO)]),,
822 enableval=default)
823 ENABLE_DOXYGEN_EXTERNAL_SEARCH="$enableval"
824
825 case "$enableval" in
826 yes)
827 dnl To match with the CMake behavior, enable doxygen when
828 dnl --enable-doxygen-external-search is enabled.
829 case "$ENABLE_DOXYGEN_SEARCH" in
830 yes|default) ENABLE_DOXYGEN_SEARCH="yes" ;;
831 no) AC_MSG_ERROR([The option --enable-doxygen-external-search requires --enable-doxygen-search]) ;;
832 esac
833 ;;
834 no|default) ;;
835 *) AC_MSG_ERROR([Invalid setting for --enable-doxygen-external-search. Use "yes" or "no"]) ;;
836 esac
837
838 AC_ARG_WITH(doxygen-search-engine-url,
839 AS_HELP_STRING([--with-doxygen-search-engine-url],
840 [Specify the external search engine for doxygen]),,)
841 WITH_DOXYGEN_SEARCH_ENGINE_URL="$withval"
842
843 AC_ARG_WITH(doxygen-search-mappings,
844 AS_HELP_STRING([--with-doxygen-search-mappings],
845 [Specify the extra search mapping for doxygen]),,)
846 WITH_DOXYGEN_SEARCH_MAPPINGS="$withval"
847
848 case "$ENABLE_DOXYGEN_SEARCH" in
849 yes)
850 if test "$ENABLE_DOXYGEN" = "0" ; then
851 AC_MSG_ERROR([The option --enable-doxygen-search requires --enable-doxygen.])
852 fi
853
854 AC_SUBST(enable_searchengine,[YES])
855
856 case "$ENABLE_DOXYGEN_EXTERNAL_SEARCH" in
857 yes)
858 AC_SUBST(enable_external_search,[YES])
859 AC_SUBST(enable_server_based_search,[YES])
860 AC_SUBST(searchengine_url,[$WITH_DOXYGEN_SEARCH_ENGINE_URL])
861 AC_SUBST(extra_search_mappings,[$WITH_DOXYGEN_SEARCH_MAPPINGS])
862 ;;
863
864 no|default)
865 AC_SUBST(enable_external_search,[NO])
866 AC_SUBST(enable_server_based_search,[NO])
867 AC_SUBST(searchengine_url,[])
868 AC_SUBST(extra_search_mappings,[])
869 ;;
870 esac
871 ;;
872
873 no|default)
874 AC_SUBST(enable_searchengine,[NO])
875 AC_SUBST(searchengine_url,[])
876 AC_SUBST(enable_server_based_search,[NO])
877 AC_SUBST(enable_external_search,[NO])
878 AC_SUBST(extra_search_mappings,[])
879 ;;
880
881 *)
882 AC_MSG_ERROR([Invalid setting for --enable-doxygen-search. Use "yes" or "no"])
883 ;;
884 esac
885
886 dnl Allow enablement of doxygen generated Qt help files
887 AC_ARG_ENABLE(doxygen-qt-help,
888 AS_HELP_STRING([--enable-doxygen-qt-help],
889 [Build Qt help files (default is NO)]),,
890 enableval=default)
891 case "$enableval" in
892 yes)
893 if test "$ENABLE_DOXYGEN" = "0" ; then
894 AC_MSG_ERROR([The option --enable-doxygen-qt-help requires --enable-doxygen.])
895 fi
896
897 AC_PATH_PROG(QHELPGENERATOR, [qhelpgenerator], [qhelpgenerator])
898
899 dnl Qt help file for llvm doxygen documentation
900 AC_SUBST(llvm_doxygen_generate_qhp,[YES])
901 AC_SUBST(llvm_doxygen_qch_filename,[org.llvm.qch])
902 AC_SUBST(llvm_doxygen_qhp_namespace,[org.llvm])
903 AC_SUBST(llvm_doxygen_qhelpgenerator_path,[$QHELPGENERATOR])
904 AC_SUBST(llvm_doxygen_qhp_cust_filter_name,[$PACKAGE_STRING])
905 AC_SUBST(llvm_doxygen_qhp_cust_filter_attrs,[$PACKAGE_NAME,$PACKAGE_VERSION])
906
907 dnl Qt help file for clang doxygen documentation
908 AC_SUBST(clang_doxygen_generate_qhp,[YES])
909 AC_SUBST(clang_doxygen_qch_filename,[org.llvm.clang.qch])
910 AC_SUBST(clang_doxygen_qhp_namespace,[org.llvm.clang])
911 AC_SUBST(clang_doxygen_qhelpgenerator_path,[$QHELPGENERATOR])
912 AC_SUBST(clang_doxygen_qhp_cust_filter_name,[Clang $PACKAGE_VERSION])
913 AC_SUBST(clang_doxygen_qhp_cust_filter_attrs,[Clang,$PACKAGE_VERSION])
914 ;;
915
916 no|default)
917 AC_SUBST(llvm_doxygen_generate_qhp,[NO])
918 AC_SUBST(llvm_doxygen_qch_filename,[])
919 AC_SUBST(llvm_doxygen_qhp_namespace,[])
920 AC_SUBST(llvm_doxygen_qhelpgenerator_path,[])
921 AC_SUBST(llvm_doxygen_qhp_cust_filter_name,[])
922 AC_SUBST(llvm_doxygen_qhp_cust_filter_attrs,[])
923
924 AC_SUBST(clang_doxygen_generate_qhp,[NO])
925 AC_SUBST(clang_doxygen_qch_filename,[])
926 AC_SUBST(clang_doxygen_qhp_namespace,[])
927 AC_SUBST(clang_doxygen_qhelpgenerator_path,[])
928 AC_SUBST(clang_doxygen_qhp_cust_filter_name,[Clang $PACKAGE_VERSION])
929 AC_SUBST(clang_doxygen_qhp_cust_filter_attrs,[Clang,$PACKAGE_VERSION])
930 ;;
931
932 *)
933 AC_MSG_ERROR([Invalid setting for --enable-doxygen-qt-help. Use "yes" or "no"]) ;;
806934 esac
807935
808936 dnl Allow disablement of threads
1515
1616 $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
1717 cat $< | sed \
18 -e 's/@abs_top_srcdir@/../g' \
1918 -e 's/@DOT@/dot/g' \
2019 -e 's/@PACKAGE_VERSION@/mainline/' \
2120 -e 's/@abs_top_builddir@/../g' \
21 -e 's/@abs_top_srcdir@/../g' \
22 -e 's/@enable_external_search@/NO/g' \
2223 -e 's/@enable_searchengine@/NO/g' \
24 -e 's/@enable_server_based_search@/NO/g' \
25 -e 's/@extra_search_mappings@//g' \
26 -e 's/@llvm_doxygen_generate_qhp@//g' \
27 -e 's/@llvm_doxygen_qch_filename@//g' \
28 -e 's/@llvm_doxygen_qhelpgenerator_path@//g' \
29 -e 's/@llvm_doxygen_qhp_cust_filter_attrs@//g' \
30 -e 's/@llvm_doxygen_qhp_cust_filter_name@//g' \
31 -e 's/@llvm_doxygen_qhp_namespace@//g' \
2332 -e 's/@searchengine_url@//g' \
24 -e 's/@enable_server_based_search@/NO/g' \
25 -e 's/@enable_external_search@/NO/g' \
26 -e 's/@extra_search_mappings@//g' > $@
33 > $@
2734 endif
2835
2936 include $(LEVEL)/Makefile.common