[PATCH] D32342: Fixed llvm/CMakeLists.txt which doesn't generate proper MakeFiles and added relative path to llvm doxygen

2017-04-21 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment.

I think most of the changes are just necessary because we replaced 
`LLVM_MAIN_SRC_DIR` with `CMAKE_SOURCE_DIR` (all the added `../` and removed 
`docs`). On the other hand this is now in sync with the way the the clang 
doxygen.cfg is structured and it fixes the include paths, so I think this looks 
reasonable.




Comment at: docs/README.txt:61
+cd 
+cmake cmake -DDOXYGEN_FOUND=true -DLLVM_ENABLE_DOXYGEN=true 
+make

`cmake cmake` => `cmake` and I guess `-DDOXYGEN_FOUND` 
=>`-DLLVM_ENABLE_DOXYGEN=On`.

And we really need documentation for building this. The only search results I 
find for this are instructions for the pre-CMake era.

Anyway, the intended way is (at least from what I can see) to just run:

cmake -DLLVM_ENABLE_DOXYGEN=On 
make doxygen-llvm # for LLVM docs
make doxygen-clang # for clang docs

instead of invoking doxygen by yourself. Could you change this?


https://reviews.llvm.org/D32342



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32342: Fixed llvm/CMakeLists.txt which doesn't generate proper MakeFiles and added relative path to llvm doxygen

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision.
Herald added a subscriber: mgorny.

Fist part is to change CMakeLists.txt and doxygen.cfg.in by following reasons:
In llvm/docs/CmakeLists.txt, it was

- set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR})
- set(abs_top_builddir ${LLVM_BINARY_DIR})

However, ${LLVM_MAIN_SRC_DIR} is not an environmental variable but  just a 
normal local PATH, which is substituted by llvm/CmakeLists.txt as follows:

297 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}  ) # --src-root   
 
298 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
299 set(LLVM_BINARY_DIR   ${CMAKE_CURRENT_BINARY_DIR}  ) # --prefix

llvm/docs/CmakeLists.txt will not be substituted by llvm/CMakeLists.txt, so we 
have to change it to ${CMAKE_CURRENT_FOO_DIR}.
In clang/docs/CmakeLists.txt, ${CMAKE_CURRENT_FOO_DIR} is already properly 
used, so we don't have to change it.

Also, I added README.txt how to generate llvm doxygen.

Second part is to change #include  to #include "Foo/Foo.h" as we did in 
clang [1].
It will change #include  to #include 
"ExecutionEngine/IntelJITEvents/jitprofiling.h"

[1]
https://reviews.llvm.org/D32113


https://reviews.llvm.org/D32342

Files:
  docs/CMakeLists.txt
  docs/README.txt
  docs/doxygen.cfg.in

Index: docs/doxygen.cfg.in
===
--- docs/doxygen.cfg.in
+++ docs/doxygen.cfg.in
@@ -58,7 +58,7 @@
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY   = @abs_top_builddir@/docs/doxygen
+OUTPUT_DIRECTORY   = @abs_top_builddir@/doxygen
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
@@ -132,7 +132,7 @@
 # shortest path that makes the file name unique will be used
 # The default value is: YES.
 
-FULL_PATH_NAMES= NO
+FULL_PATH_NAMES= YES
 
 # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
 # Stripping is only done if one of the specified strings matches the left-hand
@@ -144,16 +144,17 @@
 # will be relative from the directory where doxygen is started.
 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
 
-STRIP_FROM_PATH= ../..
+STRIP_FROM_PATH= @abs_top_srcdir@/..
 
 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
 # path mentioned in the documentation of a class, which tells the reader which
 # header file to include in order to use a class. If left blank only the name of
 # the header file containing the class definition is used. Otherwise one should
 # specify the list of include paths that are normally passed to the compiler
 # using the -I flag.
 
-STRIP_FROM_INC_PATH=
+STRIP_FROM_INC_PATH= @abs_top_srcdir@/../include
+STRIP_FROM_INC_PATH+= @abs_top_srcdir@/../lib
 
 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
 # less readable) file names. This can be useful is your file systems doesn't
@@ -513,7 +514,7 @@
 # files with double quotes in the documentation rather than with sharp brackets.
 # The default value is: NO.
 
-FORCE_LOCAL_INCLUDES   = NO
+FORCE_LOCAL_INCLUDES   = YES
 
 # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
 # documentation for inline members.
@@ -743,9 +744,9 @@
 # spaces.
 # Note: If this tag is empty the current directory is searched.
 
-INPUT  = @abs_top_srcdir@/include \
- @abs_top_srcdir@/lib \
- @abs_top_srcdir@/docs/doxygen-mainpage.dox
+INPUT  = @abs_top_srcdir@/../include \
+ @abs_top_srcdir@/../lib \
+ @abs_top_srcdir@/doxygen-mainpage.dox
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -813,7 +814,7 @@
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH   = @abs_top_srcdir@/examples
+EXAMPLE_PATH   = @abs_top_srcdir@/../examples
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -833,7 +834,7 @@
 # that contain images that are to be included in the documentation (see the
 # \image command).
 
-IMAGE_PATH = @abs_top_srcdir@/docs/img
+IMAGE_PATH = @abs_top_srcdir@/img
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should
 # invoke to filter for each input file. Doxygen will invoke the filter program
Index: docs/README.txt
===
--- docs/README.txt
+++ docs/README.txt
@@ -51,3 +51,13 @@
 
 cd