debian/rules not running ./configure

2003-10-24 Thread Zenaan Harkness
I'm trying to create my first package, and don't know what to do to get
debian/rules to run ./configure. Eg:

$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is fastdep
dpkg-buildpackage: source version is 0.15-1
dpkg-buildpackage: source maintainer is Zenaan Harkness
<[EMAIL PROTECTED]>
dpkg-buildpackage: host architecture is i386
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
# HELP/TODO: Need command to go into doc/ subdir and run clean,
distclean
/usr/bin/make distclean
make[1]: Entering directory `/home/zen/src/fastdep/fastdep-0.15'
Makefile:3: config/config.me: No such file or directory
You must run ./configure first to create config/config.me.
Use ./configure --help to get information on how to guide the
configuration.
The make process will now exit with an error.
make[1]: *** [config/config.me] Error 1
make[1]: Leaving directory `/home/zen/src/fastdep/fastdep-0.15'
make: [clean] Error 2 (ignored)
cp -f /usr/share/misc/config.sub config.sub
cp -f /usr/share/misc/config.guess config.guess
dh_clean
 dpkg-source -b fastdep-0.15
dpkg-source: building fastdep using existing fastdep_0.15.orig.tar.gz
dpkg-source: building fastdep in fastdep_0.15-1.diff.gz
dpkg-source: cannot represent change to doc/index.html:
dpkg-source:  new version is symlink
dpkg-source:  old version is nonexistent
dpkg-source: cannot represent change to config/a.out: binary file
contents changed
dpkg-source: cannot represent change to debian/.rules.swp: binary file
contents changed
dpkg-source: cannot represent change to Makefile.deb-install:
dpkg-source:  new version is symlink
dpkg-source:  old version is nonexistent
dpkg-source: warning: ignoring deletion of file doc/fastdep.html
dpkg-source: warning: ignoring deletion of file doc/fastdep.pdf
dpkg-source: building fastdep in fastdep_0.15-1.dsc
dpkg-source: unrepresentable changes to source

$ fakeroot debian/rules configure
make: Nothing to be done for `configure'.

$ touch configure

$ fakeroot debian/rules configure
make: Nothing to be done for `configure'.

We see that the fastdep package's config/config.me file is not being
created. When I manually run ./configure, this file is created. But then
dpkg-buildpackage doesn't seem to run make. Is the line

$(MAKE)

in the example rules file supposed to run the 'make' command?

I am not that familiar with make. Perhaps a little ironic since I'm
packaging fastdep, but I am also teaching myself some C++, and since I
come from years of Java background, I miss having a simple
hierarchical-directory build process that readily scales to large
projects.

TIA
Zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
I'm trying to create my first package, and don't know what to do to get
debian/rules to run ./configure. Eg:

$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is fastdep
dpkg-buildpackage: source version is 0.15-1
dpkg-buildpackage: source maintainer is Zenaan Harkness
<[EMAIL PROTECTED]>
dpkg-buildpackage: host architecture is i386
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
# HELP/TODO: Need command to go into doc/ subdir and run clean,
distclean
/usr/bin/make distclean
make[1]: Entering directory `/home/zen/src/fastdep/fastdep-0.15'
Makefile:3: config/config.me: No such file or directory
You must run ./configure first to create config/config.me.
Use ./configure --help to get information on how to guide the
configuration.
The make process will now exit with an error.
make[1]: *** [config/config.me] Error 1
make[1]: Leaving directory `/home/zen/src/fastdep/fastdep-0.15'
make: [clean] Error 2 (ignored)
cp -f /usr/share/misc/config.sub config.sub
cp -f /usr/share/misc/config.guess config.guess
dh_clean
 dpkg-source -b fastdep-0.15
dpkg-source: building fastdep using existing fastdep_0.15.orig.tar.gz
dpkg-source: building fastdep in fastdep_0.15-1.diff.gz
dpkg-source: cannot represent change to doc/index.html:
dpkg-source:  new version is symlink
dpkg-source:  old version is nonexistent
dpkg-source: cannot represent change to config/a.out: binary file
contents changed
dpkg-source: cannot represent change to debian/.rules.swp: binary file
contents changed
dpkg-source: cannot represent change to Makefile.deb-install:
dpkg-source:  new version is symlink
dpkg-source:  old version is nonexistent
dpkg-source: warning: ignoring deletion of file doc/fastdep.html
dpkg-source: warning: ignoring deletion of file doc/fastdep.pdf
dpkg-source: building fastdep in fastdep_0.15-1.dsc
dpkg-source: unrepresentable changes to source

$ fakeroot debian/rules configure
make: Nothing to be done for `configure'.

$ touch configure

$ fakeroot debian/rules configure
make: Nothing to be done for `configure'.

We see that the fastdep package's config/config.me file is not being
created. When I manually run ./configure, this file is created. But then
dpkg-buildpackage doesn't seem to run make. Is the line

$(MAKE)

in the example rules file supposed to run the 'make' command?

I am not that familiar with make. Perhaps a little ironic since I'm
packaging fastdep, but I am also teaching myself some C++, and since I
come from years of Java background, I miss having a simple
hierarchical-directory build process that readily scales to large
projects.

TIA
Zen



Re: debian/rules not running ./configure

2003-10-25 Thread Joshua Kwan
On Sat, Oct 25, 2003 at 04:38:42PM +1000, Zenaan Harkness wrote:
> I'm trying to create my first package, and don't know what to do to get
> debian/rules to run ./configure. Eg:

Assuming you used dh_make, debian/rules contains a configure and
configure-stamp target.

You want to stick ./configure into the configure-stamp target, then
touch configure-stamp.

I think you need to bone up on the general workings of Makefiles though.
[See below..]

> We see that the fastdep package's config/config.me file is not being
> created. When I manually run ./configure, this file is created. But then
> dpkg-buildpackage doesn't seem to run make. Is the line
> 
>   $(MAKE)
> 
> in the example rules file supposed to run the 'make' command?

Absolutely. $(MAKE) is a variable set by make that is usually just the
argv[0] of what you typed on the command line. Hence, because
debian/rules uses /usr/bin/make -f, it will be GNU make in this case.

> I am not that familiar with make. Perhaps a little ironic since I'm
> packaging fastdep, but I am also teaching myself some C++, and since I
> come from years of Java background, I miss having a simple
> hierarchical-directory build process that readily scales to large
> projects.

OK, maybe you already know this, but I'm feeling verbose tonight...

The general idea of Makefiles is that they are, at their simplest, a
set of small shell scripts or general rules that tell how to generate a
certain file. Make determines whether this file has to be regenerated
based on the target's dependencies. Take for example:

foo: foo.o bar.o
gcc foo.o bar.o -o foo

%.o: %.c
gcc -o $@ -c $<

foo.o: foo.c foo.h
bar.o: bar.c foo.h

This tells make a number of things. Firstly, that the command for the
'foo' target will be run if foo.o OR bar.o change, because they are
dependencies. foo.o will be reuilt if foo.c or foo.h changes. And a
general rule for generating .o files from .c files is defined by running
gcc on them, where $@ is the output target name and $< is the input
name.

This small concept is useful, for example, when you change - or simply
update the timestamp of - foo.h. This means that even if foo.o and bar.o
exist, because foo.h is NEWER in date than foo.o, foo.o must be rebuilt
using the new foo.h, and then foo.o will be more recent than the .h
file. But if you say "make foo.o" after that, make will say it's up to
date because it's newer than all its dependencies and will save time for
you.

In Debian, this all works out. We usually run debian/rules build, which
is a target that depends on build-stamp, where that depends on source
configuration and making, after which it will touch build-stamp to say
"Hey, I'm all done, no more extra work is needed here."

And the commands inside each target are simply lines of text that are
run by the shell line by line.

I hope maybe this can help you with your debian/rules wrangling with
regards to running configure.

Also watch out for the warnings that dpkg-source is giving you. Those
look rather ominous.

-- 
Joshua Kwan


pgp0.pgp
Description: PGP signature


Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
On Sat, 2003-10-25 at 17:32, Joshua Kwan wrote: 
> On Sat, Oct 25, 2003 at 04:38:42PM +1000, Zenaan Harkness wrote:
> > I'm trying to create my first package, and don't know what to do to get
> > debian/rules to run ./configure. Eg:
> 
> Assuming you used dh_make, debian/rules contains a configure and
> configure-stamp target.

dh_make, yes

rules targets:

build, depends on build-stamp

build-stamp, yes (may be this is what you meant by configure-stamp?),
depends on config.status

config.status, depends configure

configure, no ? (only as a dependency) ?, configure-stamp, no ?

Here is the relevant portion of rules, mostly auto-generated by dh_make:

=
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info


build: build-stamp

build-stamp:  config.status
dh_testdir

# Add here commands to compile the package.
$(MAKE)
/usr/bin/docbook-to-man debian/fastdep.sgml > fastdep.1
$(MAKE) -f Makefile.deb-install

touch build-stamp
=

As you can see, although there is no configure _target_, the
config.status target appears to have the ./configure command in it
(third line of it's "mini" script, please excuse the wrapping).

I have tried expanding all the variables/ substitutions, and running the
resultant configure command, and that works. It seems that this part of
the make file is simply never run.

> You want to stick ./configure into the configure-stamp target, then
> touch configure-stamp.

If you need, I can post the whole file, but as mentioned there's no
configure-stamp, dependency or target.

> I think you need to bone up on the general workings of Makefiles though.
> [See below..]

Tis true.

> OK, maybe you already know this, but I'm feeling verbose tonight...
> [...snip make intro...]
> I hope maybe this can help you with your debian/rules wrangling with
> regards to running configure.

Much appreciated. The GNU manuals can be a little terse sometimes.
However, I have some more questions, as per above.

> Also watch out for the warnings that dpkg-source is giving you. Those
> look rather ominous.

I'm happy to tackle ominous warnings... :)

Thanks heaps
Zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-25 Thread Joshua Kwan
On Sat, Oct 25, 2003 at 10:10:03PM +1000, Zenaan Harkness wrote:
> build, depends on build-stamp
> 
> build-stamp, yes (may be this is what you meant by configure-stamp?),
> depends on config.status

This is correct. That means that when config.status becomes newer than
build-stamp, build-stamp must be regenerated and hence the steps taken
to create it will be re-run (new configuration variables from
config.status.)

> config.status, depends configure

Ok. You may depend on a specific file without having an actual target
for it. Basically, when config.status becomes older than configure, it
should be run again.

What happens when you do debian/rules config.status?
Is there a config.status already in the package? It might have the same
timestamp as configure. This would be an error.

> Here is the relevant portion of rules, mostly auto-generated by dh_make:
> 
> =
> config.status: configure
>   dh_testdir
>   # Add here commands to configure the package.
>   CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
>--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
>--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info

It looks okay to me. But maybe your configure script isn't an autoconf
script, because only autoconf configure scripts produce config.status.

> > You want to stick ./configure into the configure-stamp target, then
> > touch configure-stamp.
> 
> If you need, I can post the whole file, but as mentioned there's no
> configure-stamp, dependency or target.

Maybe that could help. What about just the whole Debian source you're
working with? Then maybe we could get cooking.

-- 
Joshua Kwan


pgp0.pgp
Description: PGP signature


Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
Tar bz2-ing the whole tree (upstream source + my debian subdir)
results in 65KB file. Is it better to post this to the list,
or just to yourself?

tia
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
> Maybe that could help. What about just the whole Debian source
> you're working with? Then maybe we could get cooking.

Of course, I could upload the files and point to them - doh!

Here are
* entire tree, not including parent files (eg. .dsc, etc) (upstream +
debian subdir):
http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15+debian.tbz2

* just the debian/ subdir:
http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15-debian-only.tgz

cheers
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
> Here are
> * entire tree, not including parent files (eg. .dsc, etc) (upstream +
> debian subdir):
> http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15+debian.tbz2
> 
> * just the debian/ subdir:
> http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15-debian-only.tgz

.dsc, etc in same directory. Permissions checked.
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
What happens when you do debian/rules config.status?

$ ./debian/rules config.status
dh_testdir
# Add here commands to configure the package.
CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
--prefix=/usr --mandir=\${prefix}/share/man
--infodir=\${prefix}/share/info
/bin/sh: line 1: -g: command not found
make: *** [config.status] Error 127

> Is there a config.status already in the package? It might have the same
> timestamp as configure. This would be an error.

It doesn't appear to have one.

> It looks okay to me. But maybe your configure script isn't an autoconf
> script, because only autoconf configure scripts produce config.status.
This appears to be the case. Can we add a simple touch config.status
line somewhere to do the job?

tia
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Andreas Metzler
On Sun, Oct 26, 2003 at 08:22:26PM +1100, Zenaan Harkness wrote:
> What happens when you do debian/rules config.status?
> 
> $ ./debian/rules config.status
> dh_testdir
> # Add here commands to configure the package.
> CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
> --prefix=/usr --mandir=\${prefix}/share/man
> --infodir=\${prefix}/share/info
> /bin/sh: line 1: -g: command not found
> make: *** [config.status] Error 127
[...]

You are missing quotes, i.e.
CFLAGS="-Wall -g -O2" ...
or
CFLAGS="$(CFLAGS)" ./configure ...
 cu andreas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Eike Sauer
Am Samstag, 25. Oktober 2003 14:10 schrieb Zenaan Harkness:
> config.status: configure
>   dh_testdir
>   # Add here commands to configure the package.
>   CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \

This should read:
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \

Seems to be a dh_make bug to me?!?

Ciao,
Eike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
> - ie. I want to figure out why it does not run ./configure (properly?) ??

Should have added "now that I've got quotes around my CFLAGS argument"
- the point being, it looks to me like ./configure is not getting
called at all.

tia
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
> This should read:
> CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> Seems to be a dh_make bug to me?!?

I think so. Thanks, and to Andreas too.
Zen.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
On Sun, 2003-10-26 at 21:06, Andreas Metzler wrote:
> On Sun, Oct 26, 2003 at 08:22:26PM +1100, Zenaan Harkness wrote:
> > What happens when you do debian/rules config.status?
> > 
> > $ ./debian/rules config.status
> > dh_testdir
> > # Add here commands to configure the package.
> > CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
> > --prefix=/usr --mandir=\${prefix}/share/man
> > --infodir=\${prefix}/share/info
> > /bin/sh: line 1: -g: command not found
> > make: *** [config.status] Error 127
> [...]
> 
> You are missing quotes, i.e.
> CFLAGS="-Wall -g -O2" ...
> or
> CFLAGS="$(CFLAGS)" ./configure ...

When I look at other parts of the dh_make generated file, I see:

---
CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
---

So, I guess the quotes should be the latter (around the ./configure instance),
given that CFLAGS is possibly added to.

BTW, how can I make dpkg-buildpackage give me verbose output of what it's doing
- ie. I want to figure out why it does not run ./configure (properly?) ??

ta
zen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Andreas Metzler
On Sun, Oct 26, 2003 at 11:53:48AM +0100, Eike Sauer wrote:
> Am Samstag, 25. Oktober 2003 14:10 schrieb Zenaan Harkness:
> > config.status: configure
> > dh_testdir
> > # Add here commands to configure the package.
> > CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> This should read:
> CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> Seems to be a dh_make bug to me?!?

Yes. #213118
   cu andreas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-26 Thread Neil Roeth
On Oct 26, Zenaan Harkness ([EMAIL PROTECTED]) wrote:
 > BTW, how can I make dpkg-buildpackage give me verbose output of what it's doing
 > - ie. I want to figure out why it does not run ./configure (properly?) ??

Make will echo all commands unless they are prefixed with '@', so remove that
character from the beginning of any commands (the lines with a leading TAB).

Set DH_VERBOSE=1 to see what the debhelper commands are doing in more detail
(just an FYI, that does not seem to be the problem here).

You can figure out the dependencies and then execute them individually instead
of via dpkg-buildpackage.  For example, if some of the targets are
config.status, build, and binary, then execute:

$ fakeroot debian/rules config.status
$ fakeroot debian/rules build
$ fakeroot debian/rules binary

one at a time, and look closely at the output to see that it does what you
expect it to do.

You can also just look at what /usr/bin/dpkg-buildpackage does, it's just a
Perl script.

Make is so ubiquitous that I think you should step back and learn more about
how make works, since you seem to be unfamiliar with it.  Here's your
opportunity :-)

-- 
Neil Roeth


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: debian/rules not running ./configure

2003-10-25 Thread Joshua Kwan
On Sat, Oct 25, 2003 at 04:38:42PM +1000, Zenaan Harkness wrote:
> I'm trying to create my first package, and don't know what to do to get
> debian/rules to run ./configure. Eg:

Assuming you used dh_make, debian/rules contains a configure and
configure-stamp target.

You want to stick ./configure into the configure-stamp target, then
touch configure-stamp.

I think you need to bone up on the general workings of Makefiles though.
[See below..]

> We see that the fastdep package's config/config.me file is not being
> created. When I manually run ./configure, this file is created. But then
> dpkg-buildpackage doesn't seem to run make. Is the line
> 
>   $(MAKE)
> 
> in the example rules file supposed to run the 'make' command?

Absolutely. $(MAKE) is a variable set by make that is usually just the
argv[0] of what you typed on the command line. Hence, because
debian/rules uses /usr/bin/make -f, it will be GNU make in this case.

> I am not that familiar with make. Perhaps a little ironic since I'm
> packaging fastdep, but I am also teaching myself some C++, and since I
> come from years of Java background, I miss having a simple
> hierarchical-directory build process that readily scales to large
> projects.

OK, maybe you already know this, but I'm feeling verbose tonight...

The general idea of Makefiles is that they are, at their simplest, a
set of small shell scripts or general rules that tell how to generate a
certain file. Make determines whether this file has to be regenerated
based on the target's dependencies. Take for example:

foo: foo.o bar.o
gcc foo.o bar.o -o foo

%.o: %.c
gcc -o $@ -c $<

foo.o: foo.c foo.h
bar.o: bar.c foo.h

This tells make a number of things. Firstly, that the command for the
'foo' target will be run if foo.o OR bar.o change, because they are
dependencies. foo.o will be reuilt if foo.c or foo.h changes. And a
general rule for generating .o files from .c files is defined by running
gcc on them, where $@ is the output target name and $< is the input
name.

This small concept is useful, for example, when you change - or simply
update the timestamp of - foo.h. This means that even if foo.o and bar.o
exist, because foo.h is NEWER in date than foo.o, foo.o must be rebuilt
using the new foo.h, and then foo.o will be more recent than the .h
file. But if you say "make foo.o" after that, make will say it's up to
date because it's newer than all its dependencies and will save time for
you.

In Debian, this all works out. We usually run debian/rules build, which
is a target that depends on build-stamp, where that depends on source
configuration and making, after which it will touch build-stamp to say
"Hey, I'm all done, no more extra work is needed here."

And the commands inside each target are simply lines of text that are
run by the shell line by line.

I hope maybe this can help you with your debian/rules wrangling with
regards to running configure.

Also watch out for the warnings that dpkg-source is giving you. Those
look rather ominous.

-- 
Joshua Kwan


pgpyX0AwdlQUM.pgp
Description: PGP signature


Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
On Sat, 2003-10-25 at 17:32, Joshua Kwan wrote: 
> On Sat, Oct 25, 2003 at 04:38:42PM +1000, Zenaan Harkness wrote:
> > I'm trying to create my first package, and don't know what to do to get
> > debian/rules to run ./configure. Eg:
> 
> Assuming you used dh_make, debian/rules contains a configure and
> configure-stamp target.

dh_make, yes

rules targets:

build, depends on build-stamp

build-stamp, yes (may be this is what you meant by configure-stamp?),
depends on config.status

config.status, depends configure

configure, no ? (only as a dependency) ?, configure-stamp, no ?

Here is the relevant portion of rules, mostly auto-generated by dh_make:

=
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info


build: build-stamp

build-stamp:  config.status
dh_testdir

# Add here commands to compile the package.
$(MAKE)
/usr/bin/docbook-to-man debian/fastdep.sgml > fastdep.1
$(MAKE) -f Makefile.deb-install

touch build-stamp
=

As you can see, although there is no configure _target_, the
config.status target appears to have the ./configure command in it
(third line of it's "mini" script, please excuse the wrapping).

I have tried expanding all the variables/ substitutions, and running the
resultant configure command, and that works. It seems that this part of
the make file is simply never run.

> You want to stick ./configure into the configure-stamp target, then
> touch configure-stamp.

If you need, I can post the whole file, but as mentioned there's no
configure-stamp, dependency or target.

> I think you need to bone up on the general workings of Makefiles though.
> [See below..]

Tis true.

> OK, maybe you already know this, but I'm feeling verbose tonight...
> [...snip make intro...]
> I hope maybe this can help you with your debian/rules wrangling with
> regards to running configure.

Much appreciated. The GNU manuals can be a little terse sometimes.
However, I have some more questions, as per above.

> Also watch out for the warnings that dpkg-source is giving you. Those
> look rather ominous.

I'm happy to tackle ominous warnings... :)

Thanks heaps
Zen



Re: debian/rules not running ./configure

2003-10-25 Thread Joshua Kwan
On Sat, Oct 25, 2003 at 10:10:03PM +1000, Zenaan Harkness wrote:
> build, depends on build-stamp
> 
> build-stamp, yes (may be this is what you meant by configure-stamp?),
> depends on config.status

This is correct. That means that when config.status becomes newer than
build-stamp, build-stamp must be regenerated and hence the steps taken
to create it will be re-run (new configuration variables from
config.status.)

> config.status, depends configure

Ok. You may depend on a specific file without having an actual target
for it. Basically, when config.status becomes older than configure, it
should be run again.

What happens when you do debian/rules config.status?
Is there a config.status already in the package? It might have the same
timestamp as configure. This would be an error.

> Here is the relevant portion of rules, mostly auto-generated by dh_make:
> 
> =
> config.status: configure
>   dh_testdir
>   # Add here commands to configure the package.
>   CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
>--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
>--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info

It looks okay to me. But maybe your configure script isn't an autoconf
script, because only autoconf configure scripts produce config.status.

> > You want to stick ./configure into the configure-stamp target, then
> > touch configure-stamp.
> 
> If you need, I can post the whole file, but as mentioned there's no
> configure-stamp, dependency or target.

Maybe that could help. What about just the whole Debian source you're
working with? Then maybe we could get cooking.

-- 
Joshua Kwan


pgpJsfC6VM8Vh.pgp
Description: PGP signature


Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
Tar bz2-ing the whole tree (upstream source + my debian subdir)
results in 65KB file. Is it better to post this to the list,
or just to yourself?

tia
zen



Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
> Maybe that could help. What about just the whole Debian source
> you're working with? Then maybe we could get cooking.

Of course, I could upload the files and point to them - doh!

Here are
* entire tree, not including parent files (eg. .dsc, etc) (upstream +
debian subdir):
http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15+debian.tbz2

* just the debian/ subdir:
http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15-debian-only.tgz

cheers
zen



Re: debian/rules not running ./configure

2003-10-25 Thread Zenaan Harkness
> Here are
> * entire tree, not including parent files (eg. .dsc, etc) (upstream +
> debian subdir):
> http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15+debian.tbz2
> 
> * just the debian/ subdir:
> http://homepages.ihug.com.au/~zenaan/tmp/zenaan/files/fastdep/fastdep-0.15-debian-only.tgz

.dsc, etc in same directory. Permissions checked.
zen



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
What happens when you do debian/rules config.status?

$ ./debian/rules config.status
dh_testdir
# Add here commands to configure the package.
CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
--prefix=/usr --mandir=\${prefix}/share/man
--infodir=\${prefix}/share/info
/bin/sh: line 1: -g: command not found
make: *** [config.status] Error 127

> Is there a config.status already in the package? It might have the same
> timestamp as configure. This would be an error.

It doesn't appear to have one.

> It looks okay to me. But maybe your configure script isn't an autoconf
> script, because only autoconf configure scripts produce config.status.
This appears to be the case. Can we add a simple touch config.status
line somewhere to do the job?

tia
zen



Re: debian/rules not running ./configure

2003-10-26 Thread Andreas Metzler
On Sun, Oct 26, 2003 at 08:22:26PM +1100, Zenaan Harkness wrote:
> What happens when you do debian/rules config.status?
> 
> $ ./debian/rules config.status
> dh_testdir
> # Add here commands to configure the package.
> CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
> --prefix=/usr --mandir=\${prefix}/share/man
> --infodir=\${prefix}/share/info
> /bin/sh: line 1: -g: command not found
> make: *** [config.status] Error 127
[...]

You are missing quotes, i.e.
CFLAGS="-Wall -g -O2" ...
or
CFLAGS="$(CFLAGS)" ./configure ...
 cu andreas



Re: debian/rules not running ./configure

2003-10-26 Thread Eike Sauer
Am Samstag, 25. Oktober 2003 14:10 schrieb Zenaan Harkness:
> config.status: configure
>   dh_testdir
>   # Add here commands to configure the package.
>   CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \

This should read:
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \

Seems to be a dh_make bug to me?!?

Ciao,
Eike



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
> - ie. I want to figure out why it does not run ./configure (properly?) ??

Should have added "now that I've got quotes around my CFLAGS argument"
- the point being, it looks to me like ./configure is not getting
called at all.

tia
zen



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
> This should read:
> CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> Seems to be a dh_make bug to me?!?

I think so. Thanks, and to Andreas too.
Zen.



Re: debian/rules not running ./configure

2003-10-26 Thread Zenaan Harkness
On Sun, 2003-10-26 at 21:06, Andreas Metzler wrote:
> On Sun, Oct 26, 2003 at 08:22:26PM +1100, Zenaan Harkness wrote:
> > What happens when you do debian/rules config.status?
> > 
> > $ ./debian/rules config.status
> > dh_testdir
> > # Add here commands to configure the package.
> > CFLAGS=-Wall -g -O2 ./configure --host=i386-linux --build=i386-linux
> > --prefix=/usr --mandir=\${prefix}/share/man
> > --infodir=\${prefix}/share/info
> > /bin/sh: line 1: -g: command not found
> > make: *** [config.status] Error 127
> [...]
> 
> You are missing quotes, i.e.
> CFLAGS="-Wall -g -O2" ...
> or
> CFLAGS="$(CFLAGS)" ./configure ...

When I look at other parts of the dh_make generated file, I see:

---
CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
---

So, I guess the quotes should be the latter (around the ./configure instance),
given that CFLAGS is possibly added to.

BTW, how can I make dpkg-buildpackage give me verbose output of what it's doing
- ie. I want to figure out why it does not run ./configure (properly?) ??

ta
zen



Re: debian/rules not running ./configure

2003-10-26 Thread Andreas Metzler
On Sun, Oct 26, 2003 at 11:53:48AM +0100, Eike Sauer wrote:
> Am Samstag, 25. Oktober 2003 14:10 schrieb Zenaan Harkness:
> > config.status: configure
> > dh_testdir
> > # Add here commands to configure the package.
> > CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> This should read:
> CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
> 
> Seems to be a dh_make bug to me?!?

Yes. #213118
   cu andreas



Re: debian/rules not running ./configure

2003-10-26 Thread Neil Roeth
On Oct 26, Zenaan Harkness ([EMAIL PROTECTED]) wrote:
 > BTW, how can I make dpkg-buildpackage give me verbose output of what it's 
 > doing
 > - ie. I want to figure out why it does not run ./configure (properly?) ??

Make will echo all commands unless they are prefixed with '@', so remove that
character from the beginning of any commands (the lines with a leading TAB).

Set DH_VERBOSE=1 to see what the debhelper commands are doing in more detail
(just an FYI, that does not seem to be the problem here).

You can figure out the dependencies and then execute them individually instead
of via dpkg-buildpackage.  For example, if some of the targets are
config.status, build, and binary, then execute:

$ fakeroot debian/rules config.status
$ fakeroot debian/rules build
$ fakeroot debian/rules binary

one at a time, and look closely at the output to see that it does what you
expect it to do.

You can also just look at what /usr/bin/dpkg-buildpackage does, it's just a
Perl script.

Make is so ubiquitous that I think you should step back and learn more about
how make works, since you seem to be unfamiliar with it.  Here's your
opportunity :-)

-- 
Neil Roeth