POV-Ray : Newsgroups : povray.off-topic : What's in an IDE? : Re: What's in an IDE? Server Time
4 Sep 2024 09:18:10 EDT (-0400)
  Re: What's in an IDE?  
From: Orchid XP v8
Date: 27 Feb 2010 07:48:58
Message: <4b8914ba$1@news.povray.org>
Warp wrote:

>   Do you know what a makefile is?

Sure do!

>   Make a system which automatically builds a "makefile" behind the scenes
> and keeps it up-to-date as the source code changes (ie. by updating all the
> dependencies between files), and you have gone a long way towards an IDE.

What, you mean like

   ghc -M RootModule

or similar?

(This generates a file named "makefile", containing instructions for how 
to compile and link RootModule and everything it [recursively] depends on.)

Of course, most people will just do

   ghc --make RootModule

This (re)compiles everything that RootModule [indirectly] depends on, 
and links the result into a single executable. Unlike a makefile,

1. The "make" program is not required. (Useful on Windows.)

2. You don't have to restart the GHC binary for each source file.

3. GHC can determine what needs to be recompiled based on information 
more sophisticated than file modification time.

Then again, GHC only knows about dependencies between *Haskell* source 
files. If you had, say, a Haskell program which writes a Haskell 
program, GHC wouldn't know about that.

Fortunately, the -M switch is configurable. In particular, it can append 
the autogenerated stuff to a hand-written makefile. (And it uses magic 
comments so that successive runs of -M can delete the previously added 
dependencies before adding the current ones.) In this way, it should be 
possible to track all dependencies in a project.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.