Граф коммитов

670 Коммитов

Автор SHA1 Сообщение Дата
Jun Aruga 019cbded90 mkmf: Add a configure option to set verbose mode (V=1 or 0) in mkmf.rb.
Note this change is only for `configure.ac`, not for Windows using
`win32/configure.bat`.

```
$ ./configure --help | grep mkmf
  --enable-mkmf-verbose   enable verbose in mkmf
```

Run the following command to enable the mkmf verbose mode.

```
$ ./configure --enable-mkmf-verbose
$ grep MKMF_VERBOSE config.status
S["MKMF_VERBOSE"]="1"
```

In this mkmf verbose mode, when compiling a native extension, the
`rake compile` prints the compiling commands such as
"gcc -I. <...> path/to/file" instead of "compiling path/to/file".

```
$ git clone https://github.com/deivid-rodriguez/byebug.git
$ cd byebug
$ bundle install --standalone
$ bundle exec rake compile
...
gcc -I. <...> path/to/file
...
```
2022-05-12 12:36:10 +02:00
Kaíque Kandy Koga bdb7345ce9 Use compiled instead of complied
Capitalize creates
2022-04-26 12:38:51 -07:00
Kazuhiro NISHIYAMA e142bea799 Remove unnecessary sort
Because `Dir.[]` returns the sorted results since Ruby 3.0.
2022-04-23 11:59:20 +09:00
Alan Wu 2304cfa4c0 Document MakeMakefile#append_cflags
This method is at least 7 years old and is widely used in the wild.
Since we need to support it, let's document it to make it discoverable.
Add docs and move it out of the `# :stopdoc:` zone.
2022-04-05 12:57:55 -04:00
Nobuyoshi Nakada 6946263a29
[DOC] make internally used classes/methods nodoc
Empty class documents are generated even with `:stopdoc:`.
2022-03-20 14:26:20 +09:00
Nobuyoshi Nakada 329c89bb42
Make implicit function declaration error [Feature #18615]
Enable `-Werror=implicit-function-declaration` by default for
building C extensions for early failures.
2022-03-17 14:37:34 +09:00
Nobuyoshi Nakada 7672f6a423
mkmf: unify duplicate code in pkg_config 2022-01-29 15:29:46 +09:00
Mike Dalessio b90e56e624 mkmf: pkg_config accepts multiple options 2022-01-29 15:22:52 +09:00
Nobuyoshi Nakada 30268d1de6
Prefer flat_map 2021-12-10 18:39:48 +09:00
Nobuyoshi Nakada dff8d12226 mkmf: take `PKG_CONFIG_PATH` from `dir_config` library path
So that version dependent pkg-config files can override files in
the default locations.
2021-11-26 22:32:26 +09:00
Nobuyoshi Nakada 21a29844a3 mkmf: deal with environment variables in MakeMakefile#xpopen 2021-11-26 22:32:26 +09:00
Nobuyoshi Nakada 1c3d6d6cc9 mkmf: MakeMakefile#xpopen may be passed an option hash 2021-11-26 22:32:26 +09:00
Nobuyoshi Nakada 19beb028e7
Make explicit opening files 2021-10-15 19:59:14 +09:00
Nobuyoshi Nakada ea64e742f5
Revert "mkmf.rb: try linking at try_var" [Bug #18235]
This reverts commit 524513be39,
which can return false positive by existing but unusable symbol,
including functions.
2021-10-03 18:23:39 +09:00
Nobuyoshi Nakada cb5a41c0a0
Get rid of incompatible-pointer-types-discards-qualifiers warning 2021-09-02 08:47:47 +09:00
Nobuyoshi Nakada 524513be39
mkmf.rb: try linking at try_var
To check for variables accessible but not declared.
2021-07-08 18:18:35 +09:00
Nobuyoshi Nakada 287fb680e2
Library arguments to VC are bare file names 2021-07-03 12:52:46 +09:00
Nobuyoshi Nakada 1ac228378c
Use $ignore_error defined in mkmf.rb 2021-07-03 12:52:46 +09:00
Nobuyoshi Nakada 627aafac86
Remove also debug symbol directory at clean on macOS 2021-06-24 17:04:42 +09:00
Nobuyoshi Nakada 1356b90c91
Prefer configured command as RM_RF 2021-06-24 17:04:41 +09:00
Nobuyoshi Nakada 799ea1d154
mkmf.rb: convert also arch_hdrdir [Bug #16651] 2021-04-11 21:59:45 +09:00
Nobuyoshi Nakada 5cdf99f64e
mkmf: fixed install directories of header files in extension libraries [Bug #17761]
When installing an extension library which provides a header, that
header should be installed under site_ruby (or vendor_ruby when
"--vendor" option was given to extconf.rb).  However, currently
this file is about to be installed in the core include directory.
2021-03-30 23:28:49 +09:00
Nobuyoshi Nakada cc8e966e3c
MSys is a variant of Cygwin 2021-02-20 23:33:22 +09:00
Gannon McGibbon 9e0075a3d9 Replace "iff" with "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
2021-01-19 12:06:45 -08:00
Nobuyoshi Nakada 7f3c5e65c6
mkmf.rb: remove exts.mk at distclean 2021-01-14 00:17:23 +09:00
Nobuyoshi Nakada 4b6fd8329b
mkmf.rb: always try_compile as try_header
Get rid of "present but cannot be compiled" headers, on some
multi-architecture platforms.
2021-01-02 12:11:02 +09:00
Nobuyoshi Nakada d57c5a7b61 transcode-tblgen.rb: make silent a little when just -v 2020-12-29 17:45:19 +09:00
Nobuyoshi Nakada 3198e7abd7
Separate `send` into `public_send` and `__send__` 2020-10-27 16:12:45 +09:00
Nobuyoshi Nakada c2a6295ec0
Make the mkmf methods private in the global [Bug #16896] 2020-07-13 18:44:22 +09:00
Nobuyoshi Nakada 21d0b40de2 Added tooldir variable 2020-04-05 09:26:57 +09:00
Nobuyoshi Nakada 2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
Nobuyoshi Nakada 6180f1fede
Added link_command for C++ 2019-09-19 19:06:18 +09:00
Nobuyoshi Nakada e2aac6a611
Separate @have_devel for C++ 2019-09-19 12:25:48 +09:00
Nobuyoshi Nakada 842f600a93
Look up the language module
Look up language module with `MakeMakefile.[]`, insted of a
accessing constant under that module directly, to get rid of
expose the constant to the toplevel inadvertently.
2019-09-19 00:03:18 +09:00
Nobuyoshi Nakada f9d0778fca
Removed MakeMakefile::C
It is exposed to the topleven namespace via included MakeMakefile.
2019-09-18 22:53:23 +09:00
Nobuyoshi Nakada 9bd77d7cf3
Removed a debug print [ci skip] 2019-09-18 22:53:22 +09:00
Nobuyoshi Nakada c3f03da494
[EXPERIMENTAL] MakeMakefile::CXX for C++ 2019-09-18 18:47:02 +09:00
Jeremy Evans 325f7b6008 Make pkg_config in mkmf include -I cflags in return value
This was the historical behavior, it was modified unintentionally
by 097c3e9cbb, which started storing
these flags in a different global variable.

Also, include the incflags when logging, and document that the
method modifies $INCFLAGS.

Fixes [Bug #10651]
2019-07-23 07:57:38 -07:00
Nobuyoshi Nakada fe3ff5afb0
Suppress paranoid warnings for external/3rd-party libraries
[Feature #15665]
2019-05-23 17:36:26 +09:00
Nobuyoshi Nakada c54d5872fb
Configure directories for headers and libraries automatically
[EXPERIMENTAL]
2019-05-08 17:00:12 +09:00
nobu 3d1c86a26f Removed moving toplevel header since r12501
Moving public headers was 12-years ago, no depend files would
expect ruby.h in the top source directory now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 02:46:22 +00:00
kazu c01a5ee85e Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 08:22:10 +00:00
nobu 9b7d8947df Clear CC_WRAPPER in other than the toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 16:51:19 +00:00
nobu b0546f1cc6 Do not :stopdoc: entire classes/modules
It disables cross-references to the classes/modules, even if those
are defined in other places.  I suspect this is not an intentional
behavior, however make a workaround for the time being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26 17:08:30 +00:00
ngoto 5cc2ac98a9 mkmf.rb: set cppflags
* ext/mkmf.rb (configuration): set the default cppflags, which is
  referred from the default CPPFLAGS, for extension libraries.
  This fixes build failure of ext/zlib on Solaris 10.
  [Bug #14746] [ruby-dev:50539]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-11 15:46:21 +00:00
nobu f961bad191 Improve mkmf error message
* lib/mkmf.rb: Improve the error message when ruby.h is missing,
  to suggest installing separate packages.  [Feature #14656]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-02 04:44:35 +00:00
nobu 7184e03eb2 mkmf.rb: werror on mswin
* lib/mkmf.rb (MakeMakefile#try_ldflags): enable warning checking
  on mswin, link.exe warns -l options but does not fail.
  [Bug #13069]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-24 08:25:36 +00:00
nobu 4f03a239dc mkmf.rb: ignore linker warnings
* lib/mkmf.rb (try_ldflags): ignore linker warnings.  they cause
  unexpected failures on OpenBSD.  [ruby-core:78827] [Bug #13069]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-22 12:34:51 +00:00
shyouhei f03146dd70 int (*)(void) is incompatible with void*
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02 06:41:42 +00:00
usa 61045e037e bccwin is no longer supported
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 02:30:42 +00:00