Re: new build system

2002-11-28 Thread Joshua Haberman
* Colin Walters ([EMAIL PROTECTED]) wrote:
> On Wed, 2002-11-27 at 12:37, Mateusz Papiernik wrote:
> > > But unlike dpkg-source v2, you can start using CBS right now. Sound
> > > interesting?  Here's the URL where you can download CBS:
> > > http://cvs.verbum.org/debian/rules
> > 
> > Yes, it sounds interesting, but I had a problems with CBS and two 
> > packages (mainly GNU Gadu 2 from cvs and Kadu from kadu.net). It's all
> > ok, but when I do "debuild", at compile stage, it cannot find includes,
> > for example, when I type make manually I see:
> > 
> > gcc -c -o -I.. -I../.. -ggdb -O2 common.c
> > 
> > but when I do debuild or dpkg-buildpackage I see
> > 
> > gcc -c -o -ggdb -O2 common.c
> 
> That's because your upstream's build system is broken; the CBS make
> invocation sets CFLAGS, and your upstream's Makefile isn't properly
> coded to keep other flags like -I around when CFLAGS is set.
> 
> A temporary workaround is to just override the rule and not set CFLAGS;
> the real solution is to fix the Makefile so that this works.

I had to do this for several Makefiles tonight; my strategy was to
change

CFLAGS = -Ithis -Ithat -g

into

override CFLAGS += -Ithis -Ithat -g

Josh

-- 
Joshua Haberman  <[EMAIL PROTECTED]>




Re: new build system

2002-11-28 Thread Miles Bader
Colin Walters <[EMAIL PROTECTED]> writes:
> your upstream's Makefile isn't properly
> coded to keep other flags like -I around when CFLAGS is set.
> 
> the real solution is to fix the Makefile so that this works.

Human users will also appreciate such a fix...

-Miles
-- 
`Life is a boundless sea of bitterness'




Re: new build system

2002-11-28 Thread Colin Walters
On Wed, 2002-11-27 at 12:37, Mateusz Papiernik wrote:
> > But unlike dpkg-source v2, you can start using CBS right now. Sound
> > interesting?  Here's the URL where you can download CBS:
> > http://cvs.verbum.org/debian/rules
> 
> Yes, it sounds interesting, but I had a problems with CBS and two 
> packages (mainly GNU Gadu 2 from cvs and Kadu from kadu.net). It's all
> ok, but when I do "debuild", at compile stage, it cannot find includes,
> for example, when I type make manually I see:
> 
> gcc -c -o -I.. -I../.. -ggdb -O2 common.c
> 
> but when I do debuild or dpkg-buildpackage I see
> 
> gcc -c -o -ggdb -O2 common.c

That's because your upstream's build system is broken; the CBS make
invocation sets CFLAGS, and your upstream's Makefile isn't properly
coded to keep other flags like -I around when CFLAGS is set.

A temporary workaround is to just override the rule and not set CFLAGS;
the real solution is to fix the Makefile so that this works.





Re: new build system

2002-11-27 Thread Mateusz Papiernik
> But unlike dpkg-source v2, you can start using CBS right now. Sound
> interesting?  Here's the URL where you can download CBS:
> http://cvs.verbum.org/debian/rules

Yes, it sounds interesting, but I had a problems with CBS and two 
packages (mainly GNU Gadu 2 from cvs and Kadu from kadu.net). It's all
ok, but when I do "debuild", at compile stage, it cannot find includes,
for example, when I type make manually I see:

gcc -c -o -I.. -I../.. -ggdb -O2 common.c

but when I do debuild or dpkg-buildpackage I see

gcc -c -o -ggdb -O2 common.c

In some cases, -I.. and -I../.. are ok, but program cannot find his
includes too. What's happening? And what is wrong? Or maybe, what am I
doing wrong?



-- 
Mati ([EMAIL PROTECTED])
Sounds like a Windows problem, try calling Microsoft support




Re: new build system

2002-11-26 Thread Matthew Palmer
On 25 Nov 2002, Colin Walters wrote:

> I attempted to take some of these ideas, and adapt them to the Debian
> build system; in particular, debian/rules.  The result is currently
> called Colin's Build System, but don't let the name give you the

Oh, I like it.  I haven't used it yet, but the idea is very nice, for GNU
autoconf-ruled packages.

I'll have more comments when I've stretched it's legs a little, but for now,
I'd encourage all DD's (and other people who package) to have a look at it
and give it a go.  Hopefully at least a few people will take heed and make
their packages build a little nicer.

-- 
Matthew Palmer, Debian Developer
[EMAIL PROTECTED] http://www.debian.org





new build system

2002-11-25 Thread Colin Walters
So, while we wait for the dpkg maintainers to review the dpkg-source v2
code, I decided to address another thing I think is broken about our
source format: the excessive complexity and redundancy in debian/rules.

I was strongly influenced by Christoph Lameter's u-os package manager
source format (http://www.u-os.org/upm.html).  One basic idea is to make
simple things simple, and hard things possible.  

I attempted to take some of these ideas, and adapt them to the Debian
build system; in particular, debian/rules.  The result is currently
called Colin's Build System, but don't let the name give you the
impression that it is at all similar to Doogie's Build System or any of
the other build systems floating around there.  Instead, CBS is more of
a meta-build system; it just provides sane defaults, and lets you
customize things as needed.  

CBS is currently implemented using debhelper.  My ultimate plan is to
integrate both CBS, along with a subset of debhelper into
build-essential somehow (probably in a package named something like
build-common).  Combined with dpkg-source v2, I think the result will be
a massive reduction in packaging complexity and required maintenance for
the vast majority of packages.

But unlike dpkg-source v2, you can start using CBS right now. Sound
interesting?  Here's the URL where you can download CBS:
http://cvs.verbum.org/debian/rules

For several of my packages, I have no need to customize the build rules
*at all*; the defaults Just Work.  For a few more of my packages, I've
only had to add one line of customization in debian/rocks.  To
understand how this works, here's the first part of the CBS docs:

### Introduction to Colin's Build System #
# This file is shared between all the packages which use Colin's Build
# System.  The idea is that this file contains sane defaults, and
# stuff specific to a package should go into the debian/rocks Makefile
# fragment.  There generic hooks where you can override and add
# functionality for a specific package.

# The big motivating factor for CBS was originally that more and more
# programs today are created using GNU configure scripts and GNU
# automake, and as such they are all very similar to configure and
# build.  CBS takes advantage of this by doing stuff like looking for
# an executable file named "configure"; if it exists, CBS tries
# treating it like a GNU configure script, and passes it sane
# arguments (like --prefix=/usr).  This will work for like 90% of the
# cases out there (including at least all my packages).  But if it
# doesn't work, no problem; you can customize or just completely
# override it the debian/rocks file.  For example, suppose that you
# need to pass "--enable-foo" to the configure script.  In that case,
# all you need to do is create a file named debian/rocks, which
# contains:

# DEB_CONFIGURE_EXTRA_FLAGS := --enable-foo

# And that's it!  Everything else happens automagically.  However,
# suppose that your "configure" script isn't made by autoconf, and
# instead expects the user to interactively configure the program
# (e.g. Perl).  In that case, you can just override the
# "deb-common-configure" rule, by putting something like the following
# in your debian/rocks:

# deb-common-configure:
#   ./configure --blah --blargh < debian/answers

# All of the rules which are overridable are listed below, up to the
# line "-include debian/rocks".  There are also a large group of
# variables you may customize to affect a default rule, instead of of
# just overriding the rule completely.

# CBS also helps you keep up-to-date with the latest policy; when
# there is a new DEB_BUILD_OPTIONS entry, or they change semantics (as
# in the latest "debug" => "noopt" change), you shouldn't have to
# change anything in your packages (besides rebuilding them with the
# latest CBS version); CBS will just handle it.

### CBS and Debhelper 
# Colin's Build System currently relies heavily on debhelper version
# 4, so you must have a Build-Depends: debhelper (>= 4.0.0).

### Single vs. Multi Binary packages #
# If you have a single binary package, CBS tries to use the upstream
# Makefile to install everything into debian/packagename, so it will
# all appear in the binary package.  To remove files, move them
# around, just override the deb-binary-hook- target in
# the debian/rocks file, like:

# deb-binary-hook-mypackage:
#   mv debian/mypackage/usr/sbin/myprogram 
debian/mypackage/usr/bin/myprogram
#   rm debian/mypackage/usr/share/doc/mypackage/INSTALL

# If you have a multi-binary package, CBS (by default) uses the
# upstream Makefile to install everything in debian/tmp.  After this,
# the recommended method is to use dh_install to copy these files into
# the appropriate package.  To do this, just create
# "packagename.install" files; see the dh_install man page.