Board index » cppbuilder » Re: Comments on web pages please

Re: Comments on web pages please


2004-12-08 02:47:26 AM
cppbuilder62
Quote
... But as long as many makefiles in the
wild use sed, the dependency is there unless
you want to rewrite the makefiles.
What value is there to using sed with make?
. Ed
Quote
Chris Uzdavinis wrote in message
news: XXXX@XXXXX.COM ...
 
 

Re:Re: Comments on web pages please

Quote
... My makefiles use `sed' for automatic dependency
generation...
Try putting this at the top of the make file (Borland make)
.autodepend
. Ed
Quote
Oscar Fuentes wrote in message
news: XXXX@XXXXX.COM ...
 

Re:Re: Comments on web pages please

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >writes:
Quote
>... My makefiles use `sed' for automatic dependency
>generation...

Try putting this at the top of the make file (Borland make)

.autodepend
This depends [sic] on information put by Borland's compiler on object
files. Thus, Borland's `make' and `bcc32' are tightly coupled, which
is a good thing if you are a Borland-only shop, but not good for those
of us interested on working with multiple compilers and
platforms. Thanks to GNU `make', `sed' and a set of compilers that
emits dependency information as text files (they all do except
Borland's), a single makefile supports lots of compilers and file
production tools in general, on 4 platforms.
--
Oscar
 

{smallsort}

Re:Re: Comments on web pages please

Oscar Fuentes < XXXX@XXXXX.COM >writes:
Quote
>It's ugly, hard to read, easy to get wrong, unintuitive, cryptic, and
>not powerful.

I could understand why you attribute to `make' all those adjetives,
except for "not powerful". I'm waiting for an IDE which has a build
system as powerful as `make'. I agree that there are other tools that
can be regarded as more powerful than `make', though.
Standard make has poor string manipulation, but the whole language is
basically designed around strings. For things as simple with GNU make
as adding a suffix to a list of base filenames:
$(addsuffix .cpp,$(ENUM_FILES))
It's hard in standard make without launching external tools.
Quote
>sed is a particuarly common tool that people use in makefiles. Maybe
>you can get by without it, but lots of projects require it.

My makefiles use `sed' for automatic dependency generation. Except
for the most simple makefiles, I see it is used everywhere.
Thank you for your confirmation. Ours do too. :)
Quote
The Windows mentality is about "a program for each application" and
the *nix mentality is "a program for each task". The Windows mentality
is about monolithic, autistic programs and the *nix mentality is about
collaborating building blocks. For those who appreciate (some) *nix
virtues, there is nothing wrong about `make' using all other tools
available on a typical *nix installation. (Of course, I use Cygwin on
Windows).
Still, there's something to be said about a programming language (like
"make") that has the unfortunate distinction of making the common case
for the programmer hard.
Further, it's easier to port/install one application (gmake) to a new
platform than it is to port/install a streamlined version of make that
needs to fork out work to a handful of other applications.
--
Chris (TeamB);
 

Re:Re: Comments on web pages please

You are correct. My comment referred to using Borland's tools.
(after all, describing them is the whole reason I started this thread!),
and did not refer to cross-platform and cross-tool use.
If using Borland's command line tools then .autodepend causes
make to read the dependencies from the comment records in the
object file. Therefore header file dependencies need not be listed
in the make file rules.
. Ed
Quote
Oscar Fuentes wrote in message
news: XXXX@XXXXX.COM ...

>>... My makefiles use `sed' for automatic dependency
>>generation...
>
>Try putting this at the top of the make file (Borland make)
>
>.autodepend

This depends [sic] on information put by Borland's compiler
on object files. Thus, Borland's `make' and `bcc32' are tightly
coupled, which is a good thing if you are a Borland-only shop,
but not good for those of us interested on working with multiple
compilers and platforms. Thanks to GNU `make', `sed' and a
set of compilers that emits dependency information as text
files (they all do except Borland's), a single makefile supports
lots of compilers and file production tools in general, on 4
platforms.
 

Re:Re: Comments on web pages please

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >writes:
Quote
>... But as long as many makefiles in the
>wild use sed, the dependency is there unless
>you want to rewrite the makefiles.

What value is there to using sed with make?
Usually I see it for managing the dependencies, and for changing
filenames. For example, adding suffixes to filenames, adding path
informration, etc. With generated code (like C++ generated from CORBA
.idl files), the .idl file has a different filename than the files
that are generated (not just file extensions):
foo.idl
may be generated into files
fooC.hpp
fooC.cpp
fooS.hpp
fooS.cpp
Or other extensions, since different idl compilers generate different
names. We use TAO, which is configurable, and we have it append _Clnt
and _Srvr to our files.
One goal in writing makefiles is to never duplicate information, so
filenames should only appear once, and the makefile should calculate
the various extensions and pre/suffixes that need to be added in
special situations. That way when you change your filename or add new
rules, nothing ever gets out of synch (because it's hard enough to
debug makefiles as is.)
A lot of this is done by having makefile "templates" that you include
in your makefile. That makes it easy to write your own makefile by
offloading most of the "real" logic into the template code that's
included. That's where the power tools get used most.
--
Chris (TeamB);
 

Re:Re: Comments on web pages please

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >writes:
Quote
You are correct. My comment referred to using Borland's tools.
(after all, describing them is the whole reason I started this thread!),
and did not refer to cross-platform and cross-tool use.

If using Borland's command line tools then .autodepend causes
make to read the dependencies from the comment records in the
object file. Therefore header file dependencies need not be listed
in the make file rules.
Is .autodepend a standard make notation? :)
--
Chris (TeamB);
 

Re:Re: Comments on web pages please

Chris Uzdavinis (TeamB) < XXXX@XXXXX.COM >writes:
[snip]
Quote
Still, there's something to be said about a programming language (like
"make") that has the unfortunate distinction of making the common case
for the programmer hard.
It seems to me that the most used programming languages makes common
things hard for the programmer. It is true that those languages are
successful at convincing people that all those extra things are really
necessary, though :-)
Seriously, a declarative programming languages needs a solid
understanding and previous planning if one pretends to use it
succesfully. `make' is not different here. Once understood, it is not
so complex. But lots of people tries to write makefiles with the
mindset of a C programmer writing a simple and isolated procedure, so
it is not surprising that the result sucks.
Quote
Further, it's easier to port/install one application (gmake) to a new
platform than it is to port/install a streamlined version of make that
needs to fork out work to a handful of other applications.
I have no problem using other tools from either `make' or `gmake'. I
do it a lot. That said, `gmake' is obviously superior and I don't
consider using `make' where `gmake' is available.
--
Oscar
 

Re:Re: Comments on web pages please

Quote
Is .autodepend a standard make notation? :)
No it is not. As far as I know it is specific to Borland's
make.exe.
Note that in the part of my message that you quoted I
specified that it was for Borland's tools.
. Ed
Quote
Chris Uzdavinis wrote in message
news: XXXX@XXXXX.COM ...

>You are correct. My comment referred to using Borland's
>tools. (after all, describing them is the whole reason I
>started this thread!), and did not refer to cross-platform
>and cross-tool use.
>
>If using Borland's command line tools then .autodepend
>causes make to read the dependencies from the comment
>records in the object file. Therefore header file dependencies
>need not be listed in the make file rules.

Is .autodepend a standard make notation? :)
 

Re:Re: Comments on web pages please

Ed Mulroy [TeamB] wrote:
Quote
I have put together the first three of a set of pages
relating to how someone would work with the free
command line compler and tools that Borland has
posted for download.

The pages are not designed to teach the C or C++
languages or how to program. They are intended to get
someone who is not familiar with compilers up and running.
The examples are trivial because the point is how to use
the tools and not the fine points of how the language works.

I would like any comments and suggestions about how
they could be better.

www.mulroy.org/howto.htm

. Ed

Hello, Ed
You have done a good job with these pages.
I think they will be useful for the people trying to use
the free compiler.
I think you can also add some information about the BRC32 and BRCC32
tools, and working with .rc files in general - it will be useful
for Windows GUI programming.
Jogy
 

Re:Re: Comments on web pages please

Thanks for the kind words Jogy.
I intend to go into using the resource compiler, but have
not gotten there yet.
There are many more pages now than when I first posted
the message. They are linked to by the "Using Borland
Command Line Tools" link on my Borland page:
www.mulroy.org/borland.htm
The pages there now are
Installation, First Use
Multi-File Programs
Static Libaries
Static Linked and Dynamic Linked
Make files (4 pages, soon to be 5 or more)
Create and Use a DLL
The initial thrust is to focus on how to use the tools. While
a touch of programming is shown, it is only in the context
of illustrating the use of a tool. I have deliberately used
only simple programming examples.
After I have written about each of the tools, do you think
it appropriate to put in some real programming examples?
(still not very complex ones, but ones that do a real task)
. Ed
Quote
Jogy wrote in message
news:41b9d273$ XXXX@XXXXX.COM ...

Hello, Ed

You have done a good job with these pages.
I think they will be useful for the people trying to use
the free compiler.

I think you can also add some information about the
BRC32 and BRCC32 tools, and working with .rc files
in general - it will be useful for Windows GUI programming.
 

Re:Re: Comments on web pages please

Ed Mulroy [TeamB] < XXXX@XXXXX.COM >wrote:
Quote
>(You still owe me comments on an article.)

Oops :-(

And the machine on which I've the records of that message
from you is down. Please post the link/info to the article(s)
again.
Did you get my mail???
Quote
. Ed
[...]
Schobi
--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org
"The presence of those seeking the truth is infinitely
to be prefered to those thinking they've found it."
Terry Pratchett