delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/27/17:15:51

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Thomas8675309 AT yahoo DOT com (Tom)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How can I create a makefile automatically?
Date: 27 Feb 2004 14:09:54 -0800
Organization: http://groups.google.com
Lines: 81
Message-ID: <7b68d58f.0402271409.79bff2e4@posting.google.com>
References: <c1kne5$3p$1 AT alpha2 DOT radio-msu DOT net> <egs%b.99342$hR DOT 1953378 AT bgtnsc05-news DOT ops DOT worldnet DOT att DOT net> <c1nhhf$16qv$1 AT alpha2 DOT radio-msu DOT net>
NNTP-Posting-Host: 63.72.148.162
X-Trace: posting.google.com 1077919795 3368 127.0.0.1 (27 Feb 2004 22:09:55 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Fri, 27 Feb 2004 22:09:55 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Anthony" wrote:

> ----- Original Message -----
> > First, as you note, RHIDE will export a make file.
> > Similarly, VIDE, which in a prior message you
> > indicated you used, generates make files which you can
> > then modify to work with DJGPP without too much
> > effort.  At the very least, this gives you a base to
> > work from.
> 
> Yes, I think this is what I'm looking for. I need something that generates a
> very simple makefile of predefined structure - like VIDE does - having just
> a project filelist. I can handedit it to add things etc. but I don't want to
> create almost the same makefiles every time I start a small (3-4 sources)
> project by hands.
> I think I can look throug the VIDE or RHIDE sources and extract code that
> generates makefile into a separat utility. I was hoping that someone has
> already done it before.

All we're talking about here is having your makefile skeleton to which
you add your sources.  It wouldn't be hard to write something to
automate this - heck, a wordprocessing macro would probably do the
trick - but I wonder how much time you would save over just cutting
and pasting...

> > The idea is that this makefile will regenerate the
> > dependencies if any source file or the makefile itself
> > is modified.
> 
> I'm just curious. How does it detects that some source was modified? Does it
> store attributes of each file (like modification date and time, size, CRC
> etc.)?

Make just relies on the date/time stamp that the OS stores for each
file (e.g., the .exe file, the various .o files, the .cpp files, and
the .h files).  Relying on such info is the essence of a makefile. 
What makes the example I provided interesting is that it unlike a
typical makefile, it regenerates the actual dependencies - in other
words, if you add a header file to a source file, it will
automatically know of that new dependency.  Ordinarily, you would have
to add the new dependency manually.

> > A warning:  It sounds like you expect to run the
> > makefile from multiedit.  I don't use multiedit, but
> > my advice from before stands:  DJGPP and windows
> > programs do not interact well.  I would be surprised
> > if multiedit can successfully compile DJGPP programs
> > from within multiedit.  You'll probably find that, as
> > I recommended, you can use multiedit to do your
> > editing, but you will still have to call make from the
> > command line.
> 
> It seems like ME can compile files and catch errors information almost
> out-of-box. It can also build projects by calling make from itself (if I
> write appropriate makefile). I'm still unsure about debugging (most probably
> it can't debug within itself, but it can call some external debugger) and
> .info helpfiles reading. 

I think you're missing the point.  The kind of functionality you are
describing is also provided by a variety of programs, including vide,
code-genie, the windows versions of emacs and vim, and many others. 
The problem is that these programs typically don't interact well with
DJGPP, because it is a DOS program - i.e., they choke when you call
DJGPP's make.exe or gcc.exe.  They work fine when using windows
versions of these programs (e.g., minGW's versions), but not with the
DOS versions.  Have you actually tried compiling programs using DJGPP
from within MultiEdit?  I'm not saying it can't, but I would find it
slightly surprising unless it was designed with that in mind.


> Generally speakink, I enjoy using it a lot. The
> only upsetting thing about it that I've discovered so far - it costs ~$200.

There's a certain irony in spending $200 on an editor in order to use
a free compiler, but it's your money.

Good luck.

Best regards,

Tom

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019