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

Simplify ocamlyacc's build system #1076

Closed
wants to merge 0 commits into
base: trunk
from

Conversation

Projects
None yet
3 participants
@shindere
Contributor

shindere commented Mar 2, 2017

This PR contains two simplifications:

  1. Make the compilation of Windows specific code rely on the (standard)
    _WIN32 macro rather than on the NO_UNIX one which was defined in
    ocamlyacc's Makefile.

  2. Stop passing -DNDEBUG when compiling ocamlyacc.
    This does not change anything to the produced executable because this
    macro is actually not used anywhere in ocamlyacc's sources.

The idea behind this pull request is to make the compilation of C files
as uniform as possible accross directories so that the compilation rule can
ultimately become shared.

@dra27

This comment has been minimized.

Show comment
Hide comment
@dra27

dra27 Mar 2, 2017

Contributor

I'm not familiar with it myself, but having just Googled, I think -DNDEBUG is to do with controlling assert.h - I found this reference

The _WIN32 change is fine (I have just convinced myself for a large value of nth time that Cygwin's gcc does not define _WIN32!)

Contributor

dra27 commented Mar 2, 2017

I'm not familiar with it myself, but having just Googled, I think -DNDEBUG is to do with controlling assert.h - I found this reference

The _WIN32 change is fine (I have just convinced myself for a large value of nth time that Cygwin's gcc does not define _WIN32!)

@shindere

This comment has been minimized.

Show comment
Hide comment
@shindere

shindere Mar 2, 2017

Contributor
Contributor

shindere commented Mar 2, 2017

@shindere shindere closed this Mar 7, 2017

@shindere

This comment has been minimized.

Show comment
Hide comment
@shindere

shindere Mar 7, 2017

Contributor

Just merged

Contributor

shindere commented Mar 7, 2017

Just merged

@damiendoligez

This comment has been minimized.

Show comment
Hide comment
@damiendoligez

damiendoligez Mar 7, 2017

Member

BTW: would we want to apply -DNDEBUG to other C files?

One more item for my to-do list: replace all uses of assert with CAMLassert.

Member

damiendoligez commented Mar 7, 2017

BTW: would we want to apply -DNDEBUG to other C files?

One more item for my to-do list: replace all uses of assert with CAMLassert.

@shindere

This comment has been minimized.

Show comment
Hide comment
@shindere

shindere Mar 7, 2017

Contributor
Contributor

shindere commented Mar 7, 2017

@shindere shindere deleted the shindere:simplify-yacc-build-system branch Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment