# Mkmf generates corrupt makefile in 1.8.6

**URL:** <https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637>\
**Category:** Ruby\
**Created:** [October 10, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637 "2008-10-10T18:10:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@avdi](https://www.ruby-forum.com/u/avdi)\
**Post date:** [October 10, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637/1 "2008-10-10T18:10:56Z")

</div>

I just noticed (because libxml-ruby wouldn’t compile) that the mkmf.rb  
in my version of Ruby 1.8.6 has a bug. The generated makefile  
prefixes spaces instead of tabs for a couple of the generated make  
tasks. Specifically, the clean/distclean tasks.

It appears to have been addressed in 1.9 trunk (although oddly, the  
same tasks now use two tabs where all the others use one).

Posting this for two reasons:

1. Be aware if you are still on 1.8.6 that if you see a Make error  
complaining about spaces instead of tabs while compiling an extension,  
it’s probably mkmf’s fault and not the extensions’.

2. Does anyone know if this has been addressed in 1.8.7 or any of the  
1.8.6 patches?

–  
Avdi

Home: [http://avdi.org](http://avdi.org)  
Developer Blog: [Avdi Grimm, Code Cleric](http://avdi.org/devblog/)  
Twitter: [http://twitter.com/avdi](http://twitter.com/avdi)  
Journal: [http://avdi.livejournal.com](http://avdi.livejournal.com)

---

<div class="post-metadata">

**Author:** ![avdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@avdi](https://www.ruby-forum.com/u/avdi)\
**Post date:** [October 11, 2008, 2:00am UTC](https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637/2 "2008-10-11T02:00:32Z")

</div>

Hi,

At Sat, 11 Oct 2008 01:07:33 +0900,  
Avdi G. wrote in [ruby-talk:317345]:

> I just noticed (because libxml-ruby wouldn’t compile) that the mkmf.rb  
> in my version of Ruby 1.8.6 has a bug. The generated makefile  
> prefixes spaces instead of tabs for a couple of the generated make  
> tasks. Specifically, the clean/distclean tasks.

from where and how did you installed it? The file in the SVN  
repository doesn’t seem to have had such issue.  
Haven’t you edited it or pasted it from anywhere?

---

<div class="post-metadata">

**Author:** ![avdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@avdi](https://www.ruby-forum.com/u/avdi)\
**Post date:** [October 11, 2008, 3:38am UTC](https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637/3 "2008-10-11T03:38:49Z")

</div>

Hi,

At Sat, 11 Oct 2008 08:57:38 +0900,  
Nobuyoshi N. wrote in [ruby-talk:317382]:

> > I just noticed (because libxml-ruby wouldn’t compile) that the mkmf.rb  
> > in my version of Ruby 1.8.6 has a bug. The generated makefile  
> > prefixes spaces instead of tabs for a couple of the generated make  
> > tasks. Specifically, the clean/distclean tasks.
> 
> from where and how did you installed it? The file in the SVN  
> repository doesn’t seem to have had such issue.  
> Haven’t you edited it or pasted it from anywhere?

Anyway, I’ve modified those lines as preventive measures  
against such confusions.

---

<div class="post-metadata">

**Author:** ![avdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@avdi](https://www.ruby-forum.com/u/avdi)\
**Post date:** [October 11, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/mkmf-generates-corrupt-makefile-in-1-8-6/150637/4 "2008-10-11T21:13:28Z")

</div>

On Fri, Oct 10, 2008 at 7:57 PM, Nobuyoshi N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> from where and how did you installed it?

MacPorts.

> Haven’t you edited it or pasted it from anywhere?

Not that I recall.

–  
Avdi

Home: [http://avdi.org](http://avdi.org)  
Developer Blog: [Avdi Grimm, Code Cleric](http://avdi.org/devblog/)  
Twitter: [http://twitter.com/avdi](http://twitter.com/avdi)  
Journal: [http://avdi.livejournal.com](http://avdi.livejournal.com)
