Install.rb and extensions in /ext

I’m trying to make a new package that includes some C extensions, so I put
the .c file and extconf.rb file in the /ext subdirectory.

The directory layout looks like:

/supershape
install.rb
/ext
superhape.c
extconf.rb

Now, if I do:
$ ruby install.rb config
$ ruby install.rb setup

ruby install.rb install

I would expect that at some point (probably at: ruby install.rb setup )
that the extconf.rb file would get run and a Makefile created, and then
make would be run to create the shared library… but I don’t see any of
that happen. and I never see either the Makefile or shared lib in the
/ext subdirectory (and I don’t see gcc get invoked).

Here’s the output:

$ ruby install.rb config
install.rb: entering config phase…
—> lib
<— lib
—> ext
<— ext
install.rb: config done.
$ ruby install.rb setup
install.rb: entering setup phase…
—> lib
<— lib
—> ext
<— ext
install.rb: setup done.

… so no extension was built…
What am I missing?

Phil

Phil Tomson wrote:

The directory layout looks like:

/supershape
install.rb
/ext
superhape.c
extconf.rb

I think that you need to nest one more subdirectory under ‘ext’, i.e.

 /supershape
   install.rb
   /ext
     /supershape
       supershape.c
       extconf.rb

I think you also need to have a MANIFEST file in the
/supershape/ext/supershape subdirectory for extconf.rb to do anything.
Don’t know that it even looks at the MANIFEST file’s contents, but I
think it must be present.