Skip to content

config/Makefile.m* tidy#8640

Merged
shindere merged 15 commits intoocaml:trunkfrom
dra27:autoconf-makefile-tidy
May 14, 2019
Merged

config/Makefile.m* tidy#8640
shindere merged 15 commits intoocaml:trunkfrom
dra27:autoconf-makefile-tidy

Conversation

@dra27
Copy link
Copy Markdown
Member

@dra27 dra27 commented Apr 24, 2019

This PR is a leftover from debugging the Windows changes for the original autoconf PR. I'd quite like it merged just so that the Git history is "correct" prior to the deletion of these files (i.e. when we hit regressions, it's possible to look back at "what were the old files").

Once this is merged, I'd move that these files, and all the remaining support files for the old configure system, can be removed.

dra27 added 14 commits December 4, 2018 11:32
It's not used, but autoconf will generate it.
Allows the output to be more readily compared with autoconf's generated
s.h. Lines are purely reordered so:

diff <(git cat-file --textconv HEAD~1:config/s-nt.h | sort) \
     <(git cat-file --textconv HEAD:config/s-nt.h | sort)

should return no differences.
These match up with facts determined by autoconf. The following
additional HAS_ defines are made:

- HAS_UNISTD
    Behaviour of otherlibs/unix/access.c and otherlibs/win32unix/lseek.c
    is affected but the effect is correct.
    Behaviour of runtime/fix_code.c affected, but unistd.h includes
    io.h, so there's no effective change.
    In other cases, unistd.h is simply included where before it wasn't.
- HAS_DIRENT
    Used in Unix-only closedir.c, opendir.c, readdir.c and rewinddir.c
    Used in runtime/unix.c, but that obviously won't affect Windows!
- HAS_REWINDDIR
    Used in Unix-only rewinddir.c
- HAS_TRUNCATE
    Used in Unix-only ftruncate.c, mmap.c and truncate.c
- HAS_NANOSLEEP
    Used in Unix-only sleep.c
- HAS_GETTIMEOFDAY
    Used in vmthreads and Unix-only gettimeofday.c
    Used in runtime/sys.c, but in a branch guarded by #ifndef _WIN32
- HAS_MKSTEMP
    Changes yacc/main.c to use the MinGW implementation of mkstemp
    (part of mingwex, which is linked by flexdll)
This variable was originally added in 1973b55 and 1596174 and was always
specifically for Windows for installing the README files.

This should have been renamed to INSTALL_DISTRIB in de4f4cf (which was
part of MPR#6358/GPR#27). It should then have been removed in 13bb9d2
(GPR#1033).

May it forever rest in peace.
No-op, since spacetime is not enabled by default, but easier comparison
with autoconf
-g is ignored by flexlink, -link -g is passed on to GCC.
Pedantic correction - $(SO) is not used by the Windows ports.
@dra27 dra27 force-pushed the autoconf-makefile-tidy branch from b3f1425 to f796b38 Compare April 25, 2019 13:07
@dra27
Copy link
Copy Markdown
Member Author

dra27 commented Apr 26, 2019

The final commit of this PR can be verified as only re-ordering lines by the bash incantation:

for i in $(git diff HEAD~1 HEAD --name-only)
do
  diff <(git cat-file --textconv HEAD~1:$i | sort) <(git cat-file --textc onv HEAD:$i | sort)
done

There's a simpler view of the diff on my fork without the last line-reordering commit.

cc @shindere

@shindere
Copy link
Copy Markdown
Contributor

shindere commented May 13, 2019 via email

@shindere shindere merged commit 049f4e5 into ocaml:trunk May 14, 2019
@dra27
Copy link
Copy Markdown
Member Author

dra27 commented Jun 10, 2019

@shindere - sorry for extreme lag here - I was expecting the files to be removed in a subsequent PR (which you've done with #8720)

@shindere
Copy link
Copy Markdown
Contributor

shindere commented Jun 10, 2019 via email

@dra27
Copy link
Copy Markdown
Member Author

dra27 commented Jun 10, 2019

@shindere - sorry, I'm confusing things by having taken so long to respond to some PRs recently - you already merged this!

@shindere
Copy link
Copy Markdown
Contributor

shindere commented Jun 10, 2019 via email

smuenzel pushed a commit to smuenzel/ocaml that referenced this pull request Jun 26, 2019
* Make s-nt.h and m-nt.h more autoconf-like

* Add SIZEOF_LONGLONG to m-nt.h

It's not used, but autoconf will generate it.

* Sections of s-nt.h and m-nt moved to config.h

* Re-order lines of s-nt.h

Allows the output to be more readily compared with autoconf's generated
s.h. Lines are purely reordered so:

diff <(git cat-file --textconv HEAD~1:config/s-nt.h | sort) \
     <(git cat-file --textconv HEAD:config/s-nt.h | sort)

should return no differences.

* Add extra defines to s-nt.h for mingw32

These match up with facts determined by autoconf. The following
additional HAS_ defines are made:

- HAS_UNISTD
    Behaviour of otherlibs/unix/access.c and otherlibs/win32unix/lseek.c
    is affected but the effect is correct.
    Behaviour of runtime/fix_code.c affected, but unistd.h includes
    io.h, so there's no effective change.
    In other cases, unistd.h is simply included where before it wasn't.
- HAS_DIRENT
    Used in Unix-only closedir.c, opendir.c, readdir.c and rewinddir.c
    Used in runtime/unix.c, but that obviously won't affect Windows!
- HAS_REWINDDIR
    Used in Unix-only rewinddir.c
- HAS_TRUNCATE
    Used in Unix-only ftruncate.c, mmap.c and truncate.c
- HAS_NANOSLEEP
    Used in Unix-only sleep.c
- HAS_GETTIMEOFDAY
    Used in vmthreads and Unix-only gettimeofday.c
    Used in runtime/sys.c, but in a branch guarded by #ifndef _WIN32
- HAS_MKSTEMP
    Changes yacc/main.c to use the MinGW implementation of mkstemp
    (part of mingwex, which is linked by flexdll)

* Remove the old DISTRIB variable

This variable was originally added in 1973b55 and 1596174 and was always
specifically for Windows for installing the README files.

This should have been renamed to INSTALL_DISTRIB in de4f4cf (which was
part of MPR#6358/GPR#27). It should then have been removed in 13bb9d2
(GPR#1033).

May it forever rest in peace.

* Tweak the config/Makefile.m* to match autoconf

* Build debug runtime by default on Windows

* Build raw_spacetime_lib on msvc64 & mingw64

* Set ENABLE_CALL_COUNTS to true for Windows

No-op, since spacetime is not enabled by default, but easier comparison
with autoconf

* Remove X11 definitions from old Makefiles

win32graph removed in ocaml#2318

* mingw ports should use gcc for CPP

* Correct MKEXEDEBUGFLAG for mingw ports

-g is ignored by flexlink, -link -g is passed on to GCC.

* Correct SO to be dll not s.obj/s.o

Pedantic correction - $(SO) is not used by the Windows ports.

* Re-order lines of config/Makefile.m*
@dra27 dra27 deleted the autoconf-makefile-tidy branch July 6, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants