[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV BSD makefile support 8
From: |
John E. Davis |
Subject: |
Re: LYNX-DEV BSD makefile support 8 |
Date: |
Fri, 16 May 1997 15:57:12 -0400 |
On Fri, 16 May 1997 11:50:50 -0400 (EDT), address@hidden (Michael Sokolov) said:
> Suppose that I see a problem in the auto-generated Makefile. I fix it
>and get that version to compile. When the next version comes out, or when I
>need to install Lynx on another machine, I have to do it again. Similarly,
>when another sysadmin has the same problem, he/she has to do it again too,
>even though I have done that already. With a static Makefile, on the other
>hand, a correct target can be added in a centralized fashion for everyone's
>benefit.
That is not how it works. Your way would require intimate
knowledge of the lynx source-- not just the makefile. For example,
suppose some new lynx feature requires a dependence of a system
function such as `dlopen'. My Linux system has this function but I do
not know whether or not your BSD system has it. Furthermore, assume
that some systems have this function but it is poorly implemented and
broken. To be safe, I would write the code as:
int Lynx_new_feature (void)
{
#if HAVE_WORKING_DLOPEN
/* New feature code */
void *handle = dlopen (...);
.
.
#else
lynx_urgent_message ("Your system does not support this feature.");
#endif
}
Now, if I were to use your static makefile approach, I would have to
go through all the system specific targets and add something like
-DHAVE_WORKING_DLOPEN=0
except for those machines where I know dlopen to work as expected.
This is a bad approach and is error prone. The autoconf way is to
write a test for the presence of dlopen as well as a test that
determines whether or not it works as expected. Then that information
is written to a `config.h' file that you can, and should look at
before compiling lynx.
A final point: my linux system has the `system' function call.
However, I happen to know that `system' is broken under Linux. Do you
know whether or not you `system' function is broken? Autoconf can
determine that.
--John
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;