You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/10/24 14:34:53 UTC
gen-make.py
Greg, I know I've asked this before, but I don't remember your
rationale.
Our build system, gen-make.py, is a bit non-standard. Newbies are
constantly bitten every time a new C file appears in our tree.
The typical build-system maintains a list of C files in Makefile.in.
People know and expect this. If Makefile.in changes, then everyone
understands that ./configure needs to regenerate the Makefile. Most
people have developed a reflex of "cvs up; ./configure; make".
What's "nonstandard" about our system is the fact that you have to
re-run *autogen.sh* (or gen-make.py) when new C files are added.
Nobody suspects that. It's quite weird. It bites people constantly.
If I had a nickel for every dev-list post...!
Please remind me why our system is so much better than the norm? :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
kbrannen@gte.net writes:
> I'm only a lurker and someone who is trying to learn and evaluate svn,
> but as a newbie, I think the build process is overly complicated. I
> would *strongly* urge moving the autogen.sh step into the top of
> configure, to make a more "normal" build process. Even when there are
> RPMs and tarballs of stable releases, some will still want to get the
> source and build it (e.g. to get some patch that very important to
> them).
I'd like to point out something that hasn't (?) really been made clear
on this thread:
The reason we have a problem is that we're in an Alpha stage where we
encourage most users to build from a working copy. Building from a
working copy is *not* normal, it's just a temporary stage. With
mature software, if one builds at all, one downloads a stable source
tarball and builds that -- in which case Subversion's recipe is the
same as everyone else's:
./configure
make
make install
No autogen.sh required :-).
So the real solution here is to get stable, release official source
distributions more frequently, and not feel that everyone should be
building HEAD all the time.
Note that when building from working copies, almost all packages
include an extra step equivalent to running autogen.sh. Those that
don't usually end up versioning a generated file (`configure'), which
of course has its own problems.
> And if you don't want put a dependency on Python, write the program in
> Perl or "sh". I think almost everyone has Perl on their system, and
> if not, "sh" will definitely be there. (I haven't looked at the
> program to know if "sh" can do what you need, so that may be a bad
> suggestion, but Perl can do anything. :-)
Rewriting it would be a huge time sink for a developer who could
otherwise be fixing real bugs. I understand where you're coming from,
but this problem is a) temporary, and b) has not been solved by any
other package as far as I know... Which should make us wary of
spending time on it.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by kb...@gte.net.
Greg Stein wrote:
> On Thu, Oct 24, 2002 at 11:53:27AM -0500, B. W. Fitzpatrick wrote:
>
>>Nuutti Kotivuori <na...@iki.fi> writes:
>>...
>>
>>>Um. Is there a reason we cannot run gen-make.py when ./configure is
>>>run - to generate the Makefile.in before Makefile is generated from
>>>that?
>>
>>Well, we'd have to account for people who download the bootstrap
>>tarball and don't have python installed--I don't want to make python a
>>requirement just to bootstrap.
>
>
> That is exactly why it is run at autogen time. We state that packagers [who
> use/run autogen] must have Python. End-users [who run configure] do not
> require Python.
>
> I would suggest we avoid requiring Python during the configure process.
I'm only a lurker and someone who is trying to learn and evaluate svn, but as
a newbie, I think the build process is overly complicated. I would *strongly*
urge moving the autogen.sh step into the top of configure, to make a more
"normal" build process. Even when there are RPMs and tarballs of stable
releases, some will still want to get the source and build it (e.g. to get
some patch that very important to them).
And if you don't want put a dependency on Python, write the program in Perl or
"sh". I think almost everyone has Perl on their system, and if not, "sh" will
definitely be there. (I haven't looked at the program to know if "sh" can do
what you need, so that may be a bad suggestion, but Perl can do anything. :-)
HTH,
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Oct 24, 2002 at 11:53:27AM -0500, B. W. Fitzpatrick wrote:
> Nuutti Kotivuori <na...@iki.fi> writes:
>...
> > Um. Is there a reason we cannot run gen-make.py when ./configure is
> > run - to generate the Makefile.in before Makefile is generated from
> > that?
>
> Well, we'd have to account for people who download the bootstrap
> tarball and don't have python installed--I don't want to make python a
> requirement just to bootstrap.
That is exactly why it is run at autogen time. We state that packagers [who
use/run autogen] must have Python. End-users [who run configure] do not
require Python.
I would suggest we avoid requiring Python during the configure process.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by cm...@collab.net.
Nuutti Kotivuori <na...@iki.fi> writes:
> Karl Fogel wrote:
> > Ben Collins-Sussman <su...@collab.net> writes:
> >> What's "nonstandard" about our system is the fact that you have to
> >> re-run *autogen.sh* (or gen-make.py) when new C files are added.
> >> Nobody suspects that. It's quite weird. It bites people
> >> constantly. If I had a nickel for every dev-list post...!
>
> [...]
>
> > Is there some other solution? Greg, thoughts?
>
> Um. Is there a reason we cannot run gen-make.py when ./configure is
> run - to generate the Makefile.in before Makefile is generated from
> that?
I can't think of any. gen-make obviously doesn't require any
information from configure (or any other source except the build.conf
file and your working copy). I'd be +1 on that.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Nuutti Kotivuori <na...@iki.fi>.
Karl Fogel wrote:
> Ben Collins-Sussman <su...@collab.net> writes:
>> What's "nonstandard" about our system is the fact that you have to
>> re-run *autogen.sh* (or gen-make.py) when new C files are added.
>> Nobody suspects that. It's quite weird. It bites people
>> constantly. If I had a nickel for every dev-list post...!
[...]
> Is there some other solution? Greg, thoughts?
Um. Is there a reason we cannot run gen-make.py when ./configure is
run - to generate the Makefile.in before Makefile is generated from
that?
-- Naked
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:
>On Thu, Oct 24, 2002 at 09:28:32PM -0400, Garrett Rooney wrote:
>
>>actually, i thought we were all 'forgeting' on purpose to motivate
>>Branko to finish the .dsp generator ;-)
>>
>>
>
>Sssshhhh!! Quiet! Don't let him in on our secret plan...
>
>:-)
>
Well!
http://www.constitution.org/mac/prince00.htm
/me reads, with special attention to details.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Oct 24, 2002 at 09:28:32PM -0400, Garrett Rooney wrote:
> On Thursday, October 24, 2002, at 09:20 PM, Greg Stein wrote:
>
> > It is absolutely a realistic fear. How many people here have added
> > files and
> > not updated the .dsp files? Every single one of us. Multiple times.
> > Oh, here
> > and there, some developer with a particularly large brain on that day
> > will
> > remember to edit the .dsp file. But I'd say the 90% is to forget it.
>
> actually, i thought we were all 'forgeting' on purpose to motivate
> Branko to finish the .dsp generator ;-)
Sssshhhh!! Quiet! Don't let him in on our secret plan...
:-)
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:
>On Thu, Oct 24, 2002 at 11:54:29AM -0500, Ben Collins-Sussman wrote:
>
>
>>Karl Fogel <kf...@newton.ch.collab.net> writes:
>>
>>>Both ways are error prone, but at least our way you don't have to go
>>>crawling over the logs to figure out how to update the list when
>>>something goes wrong.
>>>
>>>
>>Actually, I don't think this is a realistic fear. I don't see how a
>>developer could add a new C file and forget to edit the static list;
>>otherwise the developer would never be able to compile at all. And we
>>all know that while perhaps we don't always run 'make check' before
>>each commit, we all *do* compile our changes first. :-)
>>
>>
>
>It is absolutely a realistic fear. How many people here have added files and
>not updated the .dsp files? Every single one of us. Multiple times. Oh, here
>and there, some developer with a particularly large brain on that day will
>remember to edit the .dsp file. But I'd say the 90% is to forget it.
>
Hear, hear. The way things stand now, I never have to worry about
getting flamed for not updating the Unix file list. So I can keep my
blowtorch handy with a clear conscience. :-)
>The gen-make system is designed to keep both build systems in sync.
>Automatically.
>
[...later...]
>And, of course, changes in the system might lose or complicate the .dsp
>generation capability. (not there yet, but getting closer every day...)
>
Exactly. I have a large, cast-iron "-1" here, to be used as a siege
weapon against attempts to rip out the gen-make stuff.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Thursday, October 24, 2002, at 09:20 PM, Greg Stein wrote:
> It is absolutely a realistic fear. How many people here have added
> files and
> not updated the .dsp files? Every single one of us. Multiple times.
> Oh, here
> and there, some developer with a particularly large brain on that day
> will
> remember to edit the .dsp file. But I'd say the 90% is to forget it.
actually, i thought we were all 'forgeting' on purpose to motivate
Branko to finish the .dsp generator ;-)
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Oct 24, 2002 at 11:54:29AM -0500, Ben Collins-Sussman wrote:
> Karl Fogel <kf...@newton.ch.collab.net> writes:
> > Ben Collins-Sussman <su...@collab.net> writes:
>...
> > Even in this respect, if you consider the usual alternative: many
> > systems require developers to remember to update a statically
> > maintained list whenever they add a new C file.
>
> Which is the norm. It's the difference between *one* developer having
> to remember to augment a static list, vs. *all* developers having to
> remember to re-run their generators. I don't like the burden being
> spread out like that... it doesn't make sense to me. People already
> run "./configure; make" all the time. I'm tired of teaching newbies
> about the non-standard "gen-make.py build.conf; ./configure; make"
> sequence.
Yes, that is non-standard. But you can also tell them the standard way:
$ ./autogen.sh
$ ./configure
$ make
Using gen-make.py directly is an optimization to skip some autogen steps.
That is the approach that I've always advocated, but you can always return
to recommending autogen.sh.
Note that autogen.sh is also needed in automake-based projects when files
are added, so our need for it when files arrive isn't new/extraordinary.
Also note that gen-make and autogen are only for people working direct from
the repository. People using tarballs don't need to know about either.
> > Our system generates that list automatically, [...]
>
> ...which feels a tad sloppy. If I copy a temporary .c file into the
> working copy, I'd hate to see it accidentally picked up by the build
> scanner.
You've never raised this issue, and it hasn't ever come up in the 16 months
or so that we've been using gen-make. I'll round-file this point :-)
> Step back for a second. Here have this nice system with a beautiful
> .conf file that allows you to be specific about *so* many behaviors,
> and yet this system *doesn't* have inherent knowledge about what files
> to compile for any given thing. Doesn't that strike you as odd?
If you would like, you can list the specific files in build.conf. It totally
supports that style. IMO, that would be a mistake.
The concept of "compile all .c files in this directory" for this link-unit
has worked quite well for us.
> > Both ways are error prone, but at least our way you don't have to go
> > crawling over the logs to figure out how to update the list when
> > something goes wrong.
>
> Actually, I don't think this is a realistic fear. I don't see how a
> developer could add a new C file and forget to edit the static list;
> otherwise the developer would never be able to compile at all. And we
> all know that while perhaps we don't always run 'make check' before
> each commit, we all *do* compile our changes first. :-)
It is absolutely a realistic fear. How many people here have added files and
not updated the .dsp files? Every single one of us. Multiple times. Oh, here
and there, some developer with a particularly large brain on that day will
remember to edit the .dsp file. But I'd say the 90% is to forget it.
The gen-make system is designed to keep both build systems in sync.
Automatically.
Back to the original query, it would be possible to insert an extra step to
deal with added files. Specifically, we could have gen-make build a
"structure" and then the ./configure script would flesh that out by
inserting whatever set of .c files it finds in specific dirs at configure
time.
Consider the following example from build-outputs.mk today:
libsvn_test_DEPS = subversion/tests/svn_test_editor.lo subversion/tests/svn_tests_main.lo subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la
libsvn_test_OBJECTS = svn_test_editor.lo svn_tests_main.lo
subversion/tests/libsvn_test-1.la: $(libsvn_test_DEPS)
cd subversion/tests && $(LINK) -o libsvn_test-1.la $(libsvn_test_OBJECTS) ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS)
It could be possible to copmute the _DEPS and _OBJECTS at configure time if
we told some processor "for libsvn_test, look in subversion/tests/*.c".
Thus, the set of source files is automatically updated at configure time.
But, again, I would not advocate that choice. This means that you must run
the full-on ./configure script to get file additions/removals reflected in
the build system. Today, a developer can:
$ svn add path/to/new/file.c
$ ./gen-make.py build.conf
$ make local-all
If we altered it, then you'd have to:
$ svn add path/to/new/file.c
$ ./configure
$ make local-all
And I can tell you which is going to be faster or slower :-)
Note that "classic" systems also run some of the overhead of ./configure. In
those systems, a develop adds a .c file to a Makefile.in and then runs
config.status to regenerate Makefiles. We could conceivably hook into the
config.status processing for finding the .c files, thus avoiding the bulk of
configure.
By splitting the system into two steps, that also means you *need* those two
steps. Changes to build.conf must be run during autogen.sh *and* during
config processing.
In the current model, we have two independent pieces: build-outputs.mk which
consists of config-independent build info (build by autogen.sh) and
Makefile(.in) which consistes of config-dependent build info, and it selects
the appropriate parts from build-outputs. We can make lots of changes to
build.conf and never need to run any part of the config process.
And lastly, think back to the people who are affected by this: people
working from source control. Developers. You can tell them to run the
autogen sequence after each pull, or the configure (or config.status) after
each pull, but they'll forget to do it sometimes. Or think they won't need
to (I always avoid re-running configure/config.status in httpd or apr(util)
and get bit, just like you're talking about.
Changing the mechanics of the system will not change the social aspect which
is the root of the problem (run X after updating).
And, of course, changes in the system might lose or complicate the .dsp
generation capability. (not there yet, but getting closer every day...)
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Ben Collins-Sussman <su...@collab.net>.
Karl Fogel <kf...@newton.ch.collab.net> writes:
> Ben Collins-Sussman <su...@collab.net> writes:
> > What's "nonstandard" about our system is the fact that you have to
> > re-run *autogen.sh* (or gen-make.py) when new C files are added.
> > Nobody suspects that. It's quite weird. It bites people constantly.
> > If I had a nickel for every dev-list post...!
> >
> > Please remind me why our system is so much better than the norm? :-)
>
> Now, let's be fair :-). The system is a lot better than the norm in
> many respects...
Oh, definitely. It's quite flexible. I really like being able to
edit build.conf. The system, overall, is way cool. I'm just not
happy with this one certain aspect.
> Even in this respect, if you consider the usual alternative: many
> systems require developers to remember to update a statically
> maintained list whenever they add a new C file.
Which is the norm. It's the difference between *one* developer having
to remember to augment a static list, vs. *all* developers having to
remember to re-run their generators. I don't like the burden being
spread out like that... it doesn't make sense to me. People already
run "./configure; make" all the time. I'm tired of teaching newbies
about the non-standard "gen-make.py build.conf; ./configure; make"
sequence.
> Our system generates that list automatically, [...]
...which feels a tad sloppy. If I copy a temporary .c file into the
working copy, I'd hate to see it accidentally picked up by the build
scanner.
Step back for a second. Here have this nice system with a beautiful
.conf file that allows you to be specific about *so* many behaviors,
and yet this system *doesn't* have inherent knowledge about what files
to compile for any given thing. Doesn't that strike you as odd?
> Both ways are error prone, but at least our way you don't have to go
> crawling over the logs to figure out how to update the list when
> something goes wrong.
Actually, I don't think this is a realistic fear. I don't see how a
developer could add a new C file and forget to edit the static list;
otherwise the developer would never be able to compile at all. And we
all know that while perhaps we don't always run 'make check' before
each commit, we all *do* compile our changes first. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: gen-make.py
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:
> What's "nonstandard" about our system is the fact that you have to
> re-run *autogen.sh* (or gen-make.py) when new C files are added.
> Nobody suspects that. It's quite weird. It bites people constantly.
> If I had a nickel for every dev-list post...!
>
> Please remind me why our system is so much better than the norm? :-)
Now, let's be fair :-). The system is a lot better than the norm in
many respects... Even in this respect, if you consider the usual
alternative: many systems require developers to remember to update a
statically maintained list whenever they add a new C file. Our system
generates that list automatically, you just have to remember to run
the generator now and then. Both ways are error prone, but at least
our way you don't have to go crawling over the logs to figure out how
to update the list when something goes wrong.
Still, it would be nice if we could somehow notice added files and set
a flag, so the programmer gets a nice error instead of an arbitrary
"build failed" error. But the only way I can think of right now is
via generic client side hooks
*** CRINGE ***
and we just shouldn't go there, since that essentially requires a
built-in extension language.
Is there some other solution? Greg, thoughts?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org