Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Arrange '-D' cpp macro definitions #601

Merged

Conversation

p-montanus
Copy link
Contributor

Arranging '-D' cpp macro definitions in Makefile.in.
fix #584.

Target '-D' cpp macro definitions are:

-Dbool=int
-Dfalse=0
-Dtrue=1
-DCTAGS_COMMIT_ID=0x$(REV)
-DREADTAGS_MAIN
-DDEBUG
-D_GNU_SOURCE
-D__USE_GNU
-DDATADIR=\"$(pkgdatadir)\"
-DPKGCONFDIR=\"$(pkgsysconfdir)\"
-DPKGLIBEXECDIR=\"$(pkglibexecdir)\"

Add configure arg-vars:

EXTRA_CPPFLAGS  extra (Objective) C/C++ preprocessor flags [-D_GNU_SOURCE -D__USE_GNU]
DEBUG_CPPFLAGS  (Objective) C/C++ preprocessor debug flags [-DDEBUG]

configure arg-vars can be specified like this:

$ ./configure DEBUG_CPPFLAGS=''

or

$ DEBUG_CPPFLAGS='' ./configure

Add 'DEBUG_CPPFLAGS' configure arg-var option.
Add 'EXTRA_CPPFLAGS' configure arg-var option.
Add '#define READTAGS_MAIN' just before '#ifdef ... #endif' guard in readtags.c.
Define 'bool', 'true', and 'false' cpp macros at config.h,
if '<stdbool.h>' is missing or broken.
Define 'CTAGS_COMMIT_ID' cpp macro at config.h,
if 'git' command available.
PRETTY_VAR_EXPAND() provides expansion of nested variable.
…EXECDIR=...' flags

Define 'DATADIR', 'PKGCONFDIR', and 'PKGLIBEXECDIR' cpp macros at config.h.
…sistency

Rename 'DATADIR' to 'PKGDATADIR', and 'PKGCONFDIR' to 'PKGSYSCONFDIR'
@p-montanus p-montanus force-pushed the arrange-cpp-macro-definitions branch from 55fd368 to f3079be Compare October 5, 2015 12:09
masatake added a commit that referenced this pull request Oct 12, 2015
build: Arrange '-D' cpp macro definitions
@masatake masatake merged commit f256757 into universal-ctags:master Oct 12, 2015
@masatake
Copy link
Member

Thank you. These change set may be needed in ctagst translator related changes.
(I revert the two commits manually.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Arrange '-D' cpp macro definitions in Makefile.in
2 participants