1================ 2Modularize Usage 3================ 4 5``modularize [<modularize-options>] [<module-map>|<include-files-list>]* 6[<front-end-options>...]`` 7 8``<modularize-options>`` is a place-holder for options 9specific to modularize, which are described below in 10`Modularize Command Line Options`. 11 12``<module-map>`` specifies the path of a file name for an 13existing module map. The module map must be well-formed in 14terms of syntax. Modularize will extract the header file names 15from the map. Only normal headers are checked, assuming headers 16marked "private", "textual", or "exclude" are not to be checked 17as a top-level include, assuming they either are included by 18other headers which are checked, or they are not suitable for 19modules. 20 21``<include-files-list>`` specifies the path of a file name for a 22file containing the newline-separated list of headers to check 23with respect to each other. Lines beginning with '#' and empty 24lines are ignored. Header file names followed by a colon and 25other space-separated file names will include those extra files 26as dependencies. The file names can be relative or full paths, 27but must be on the same line. For example:: 28 29 header1.h 30 header2.h 31 header3.h: header1.h header2.h 32 33Note that unless a ``-prefix (header path)`` option is specified, 34non-absolute file paths in the header list file will be relative 35to the header list file directory. Use -prefix to specify a different 36directory. 37 38``<front-end-options>`` is a place-holder for regular Clang 39front-end arguments, which must follow the <include-files-list>. 40Note that by default, the underlying Clang front end assumes .h files 41contain C source, so you might need to specify the ``-x c++`` Clang option 42to tell Clang that the header contains C++ definitions. 43 44Note also that because modularize does not use the clang driver, 45you will likely need to pass in additional compiler front-end 46arguments to match those passed in by default by the driver. 47 48Modularize Command Line Options 49=============================== 50 51.. option:: -prefix <header-path> 52 53 Prepend the given path to non-absolute file paths in the header list file. 54 By default, headers are assumed to be relative to the header list file 55 directory. Use ``-prefix`` to specify a different directory. 56 57.. option:: -module-map-path=<module-map-path> 58 59 Generate a module map and output it to the given file. See the description 60 in :ref:`module-map-generation`. 61 62.. option:: -root-module=<root-name> 63 64 Put modules generated by the -module-map-path option in an enclosing 65 module with the given name. See the description in :ref:`module-map-generation`. 66 67.. option:: -block-check-header-list-only 68 69 Limit the #include-inside-extern-or-namespace-block 70 check to only those headers explicitly listed in the header list. 71 This is a work-around for avoiding error messages for private includes that 72 purposefully get included inside blocks. 73 74.. option:: -no-coverage-check 75 76 Don't do the coverage check for a module map. 77 78.. option:: -coverage-check-only 79 80 Only do the coverage check for a module map. 81