Pierre Joye | 6 Feb 16:27 2008
Picon

Little makefile patch

Hi!

Here is a little patch to make the Makefile happier especially "make
install" when one of the target directories already exists.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org
--- ./neko-1.6.0/Makefile	2007-07-25 16:59:41.000000000 +0200
+++ ../neko-1.6.0/Makefile	2008-02-06 16:19:58.000000000 +0100
 <at>  <at>  -136,9 +136,9  <at>  <at>  clean:
 install:
 	cp bin/${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib
 	cp bin/neko bin/nekoc bin/nekotools ${INSTALL_PREFIX}/bin
-	-mkdir ${INSTALL_PREFIX}/lib/neko
+	-if test ! -d ${INSTALL_PREFIX}/lib/neko; then -mkdir -p ${INSTALL_PREFIX}/lib/neko; fi
 	cp bin/*.ndll ${INSTALL_PREFIX}/lib/neko
-	-mkdir ${INSTALL_PREFIX}/include
+	-if test ! -d ${INSTALL_PREFIX}/include; then -mkdir ${INSTALL_PREFIX}/include; fi
 	cp vm/neko*.h ${INSTALL_PREFIX}/include
 
 uninstall:
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
(Continue reading)

Nicolas Cannasse | 6 Feb 17:10 2008

Re: Little makefile patch

Pierre Joye a écrit :
> Hi!
> 
> Here is a little patch to make the Makefile happier especially "make
> install" when one of the target directories already exists.

Hello Pierre, the '-' symbol in front of mkdir is used to ignore a
failure to create the directory, so testing should not be necessary.
Maybe adding a 2>/dev/null would be enough ?

Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Pierre Joye | 6 Feb 17:29 2008
Picon

Re: Little makefile patch

On Feb 6, 2008 5:10 PM, Nicolas Cannasse <ncannasse <at> motion-twin.com> wrote:
> Pierre Joye a écrit :
> > Hi!
> >
> > Here is a little patch to make the Makefile happier especially "make
> > install" when one of the target directories already exists.
>
> Hello Pierre, the '-' symbol in front of mkdir is used to ignore a
> failure to create the directory,

Oh.  I did not know that :)

> so testing should not be necessary.
> Maybe adding a 2>/dev/null would be enough ?

The problem I got was that make stopped at these points. However
redirecting the messages to /dev/null would be nice too. I can update
the patch accordingly if you wish it.

Another question, what do you think about using something more handy
than simple makefiles? I like CMake as it allows to use almost the
same scripts on all platforms (vc++, ming, cygwin, linux, etc.) and
supports packaging and tests (resp. cpack and ctest).

Thanks for your fantastic work on neko!

Cheers,
--

-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org
(Continue reading)

Nicolas Cannasse | 6 Feb 17:58 2008

Re: Little makefile patch

> The problem I got was that make stopped at these points. 

It should not, given that there's '-' in front of the command.

> However
> redirecting the messages to /dev/null would be nice too. I can update
> the patch accordingly if you wish it.
> 
> Another question, what do you think about using something more handy
> than simple makefiles? I like CMake as it allows to use almost the
> same scripts on all platforms (vc++, ming, cygwin, linux, etc.) and
> supports packaging and tests (resp. cpack and ctest).

I'm trying to keep Makefile as much simple as possible.

Once nekovm + std library has been built, further steps are done by a
neko script for handling complex tasks such as resolving other libraries
dependencies.

Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Pierre Joye | 6 Feb 19:14 2008
Picon

Re: Little makefile patch

Hi Nicolas,

On Feb 6, 2008 5:58 PM, Nicolas Cannasse <ncannasse <at> motion-twin.com> wrote:
> > The problem I got was that make stopped at these points.
>
> It should not, given that there's '-' in front of the command.

I will test it again on another box and come back if the problem persists.

> > However
> > redirecting the messages to /dev/null would be nice too. I can update
> > the patch accordingly if you wish it.
> >
> > Another question, what do you think about using something more handy
> > than simple makefiles? I like CMake as it allows to use almost the
> > same scripts on all platforms (vc++, ming, cygwin, linux, etc.) and
> > supports packaging and tests (resp. cpack and ctest).
>
> I'm trying to keep Makefile as much simple as possible.
>
> Once nekovm + std library has been built, further steps are done by a
> neko script for handling complex tasks such as resolving other libraries
> dependencies.

Easier, obviously.

Cheers,
--

-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org
(Continue reading)

modulatum | 11 Feb 02:38 2008
Picon

Neko doesn't load its own modules

I have a newly downloaded copy of Neko (Win32) and the following script:

foo = $loader.loadmodule("std",$loader);
causes the following error:
Uncaught exception - load.c(176) : Module not found : std
The same happens for regexp and other standard modules. Using primitives from these modules is no problem, it's only when they're loaded that the error occurs.
Please advise,
mod
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Nicolas Cannasse | 11 Feb 09:38 2008

Re: Neko doesn't load its own modules

modulatum <at> gmail.com a écrit :
> I have a newly downloaded copy of Neko (Win32) and the following script:
> foo = $loader.loadmodule("std",$loader);
> causes the following error:
> Uncaught exception - load.c(176) : Module not found : std
> The same happens for regexp and other standard modules. Using primitives
> from these modules is no problem, it's only when they're loaded that the
> error occurs.

A module is a .n file, not a .ndll
.ndll files are loaded indirectly with loadprimitive

Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

modulatum | 11 Feb 13:25 2008
Picon

Re: Neko doesn't load its own modules

I see. So how would I go about implementing the right structure in source-code like this?

Regexp = $loader.loadmodule("neko/regexp", $loader)

// basically replaces real newlines with readable \n
$exports.inspect = function(original_string){
var string = $scopy(original_string)
regex = Regexp.new("[\\n\\t]")
string = Regexp.replace_all(Regexp.new("\007"), string, "\\a")
return string
}Source found here: http://oxyliquit.manveru.net/oxid/neko/string.neko

Mod

On Feb 11, 2008 3:38 AM, Nicolas Cannasse <ncannasse <at> motion-twin.com> wrote:
modulatum <at> gmail.com a écrit :
> I have a newly downloaded copy of Neko (Win32) and the following script:
> foo = $loader.loadmodule("std",$loader);
> causes the following error:
> Uncaught exception - load.c(176) : Module not found : std
> The same happens for regexp and other standard modules. Using primitives
> from these modules is no problem, it's only when they're loaded that the
> error occurs.

A module is a .n file, not a .ndll
.ndll files are loaded indirectly with loadprimitive

Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Nicolas Cannasse | 11 Feb 13:50 2008

Re: Neko doesn't load its own modules

modulatum <at> gmail.com a écrit :
> I see. So how would I go about implementing the right structure in 
> source-code like this?
> 
> Regexp = $loader.loadmodule("neko/regexp", $loader)

You can see that there's a "neko/regexp.neko" file that is compiled as 
part of the project :
http://oxyliquit.manveru.net/oxid/neko/

Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

modulatum | 11 Feb 16:50 2008
Picon

Re: Neko doesn't load its own modules

I realized that as well. Thanks for your answer!
Is there any chance that Neko will implement these native modules by default?
Mod

On Feb 11, 2008 7:50 AM, Nicolas Cannasse <ncannasse <at> motion-twin.com> wrote:
> I see. So how would I go about implementing the right structure in
> source-code like this?
>
> Regexp = $loader.loadmodule("neko/regexp", $loader)

You can see that there's a "neko/regexp.neko" file that is compiled as
part of the project :
Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Gmane