Skip to content

Commit

Permalink
docs: Write about makefile options
Browse files Browse the repository at this point in the history
Write about DEBUG option and WITH_ICONV option.
Also update about MSYS2, fix typos.
  • Loading branch information
k-takata committed Jan 8, 2016
1 parent d2a1a71 commit 1f151e6
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Obviously there is Microsoft Visual Studio 2013. Many professional developers ta

Installing Visual Studio will give you the IDE, the command line compilers and the MS-version of make named nmake.

Note that ctags can not be build with Visual Studio older then 2013 anymore. There is C99 (or C11) coding used that generate syntax errors with VS2010 and older. This could effect compilers from other vendors as well.
Note that ctags can not be build with Visual Studio older than 2013 anymore. There is C99 (or C11) coding used that generate syntax errors with VS2012 and older. This could effect compilers from other vendors as well.


GCC
Expand All @@ -44,6 +44,14 @@ Microsoft Visual Studio

Most users of Visual Studio will use the IDE and not the command line to compile a project. But by default a shortcut to the command prompt that sets the proper path is installed in the Start Menu. When this command prompt is used ``nmake -f mk_mvc.mak`` will compile ctags. You can also go into the ``win32`` subdirectory and run ``msbuild ctags_vs2013.sln`` for the default build. Use ``msbuild ctags_vs2013.sln /p:Configuration=Release`` to specifically build a release build. MSBuild is what the IDE uses internally and therefore will product the same files as the IDE.

If you want to build an iconv enabled version, you must specify ``WITH_ICONV=yes`` and ``ICONV_DIR`` like below::

nmake -f mk_mvc.mak WITH_ICONV=yes ICONV_DIR=path/to/iconvlib

If you want to build a debug version using ``mk_mvc.mak``, you must specify ``DEBUG=1`` like below::

nmake -f mk_mvc.mak DEBUG=1

GCC
.............................................................................

Expand All @@ -60,6 +68,14 @@ Native win32 version of the GNU/Linux command cp, rm and mv can be useful. rm is

Any Windows includes a command prompt. Not the most advanced, but it is enough to do the build tasks. Make sure the path is set properly and ``make -f mk_mingw.mak`` should do the trick.

If you want to build an iconv enabled version, you must specify ``WITH_ICONV=yes`` like below::

make -f mk_mingw.mak WITH_ICONV=yes

If you want to build a debug version, you must specify ``DEBUG=1`` like below::

make -f mk_mingw.mak DEBUG=1

**MSYS**

From their site: MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.
Expand All @@ -68,7 +84,7 @@ MSYS comes in two flavors. The original from MinGW and a MSYS2 http://sourceforg

MSYS is old but still works. You can build ctags with it using ``make -f mk_mingw.mak``. The Autotools are too old on MSYS so you can not use them.

MSYS2 is a more maintained version of MSYS, but specially geared towards MinGW-w64. Still to be investigated.
MSYS2 is a more maintained version of MSYS, but specially geared towards MinGW-w64. You can also use Autotools to build ctags.

**Cygwin**

Expand Down Expand Up @@ -123,7 +139,7 @@ There other things where building ctags on Microsoft Windows differs from buildi
- Windows file systems use backslashes "\\" as path separators, but paths with forward slashes "/" are no problem for a Windows program to recognize, even when a full path (include drive letter) is used.
- The default line-ending on Windows is CRLF. A tags file generated by the Windows build of ctags will contain CRLF.
- The tools used to build ctags do understand Unix-line endings without problems. There is no need to convert the line-ending of existing files in the repository.
- Due to the differences between the GNU/Linux and Windows C runtime library there are some things that need to be added to ctags to make make the program as powerful as it is on GNU/Linux. At this moment regex and fnmatch are borrowed from glibc.
- Due to the differences between the GNU/Linux and Windows C runtime library there are some things that need to be added to ctags to make the program as powerful as it is on GNU/Linux. At this moment regex and fnmatch are borrowed from glibc.
- Because there is no default scandir() for Windows, the optlib feature is not yet available for Windows. Various implementations of scandir() for Windows do exist, but still have to be investigated.
- The xcmd feature is not yet available for Windows. This needs to be investigated.
- Units testing needs a decent ``bash`` shell. It is only tested using Cygwin.
- Units testing needs a decent ``bash`` shell. It is only tested using Cygwin or MSYS2.

0 comments on commit 1f151e6

Please sign in to comment.