Re: RFC: Exclude config.sub and config.guess from
On Mon, Feb 11, 2008 at 04:42:34PM +0100, David Paleino wrote: Il giorno Mon, 11 Feb 2008 15:19:08 +0100 Daniel Leidert [EMAIL PROTECTED] ha scritto: Copy the config.* scripts after the clean target has been called (e.g. in the config.status target) then they are simply not part of the diff.gz. Of course they would be after a second build run. If you care and if you want to avoid this: preserve the original config.* scripts and put them back in the clean-target. This increases the whole debian/rules file for around 4 lines. This *is* much more easier than any other suggestion I read in this thread. [1] I know that using [ ! test ] || ... is pretty awkward, but it didn't work with [ test ] . Maybe should be escaped somehow? I don't really know. A set -e shell script doesn't terminate if a nonzero return value is a part of a conditional/test. However in a makefile, the exit status of the shell can be nonzero even if it was a due to a test failing, so you have to use [ ! ] || and not the more readable [ ] , since the sh -c '' will still exit 1. For the same reason, you need to explicitly exit 0 at the end of some scripts: for a do [...] [ ] foo done # Necessary due to the test exit 0 Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: RFC: Exclude config.sub and config.guess from
On 11/02/2008, David Paleino wrote: This seems to me more hackish than it should; is there a cleaner way to do it (maybe I'm just complicating myself and don't see The Easy Way [1])? You could have a look at how cdbs does it, which might help. [1] I know that using [ ! test ] || ... is pretty awkward, but it didn't work with [ test ] . Maybe should be escaped somehow? I don't really know. That's simple, compare: [ foo ] bar [ ! foo ] || bar If foo, then bar, and success. If not foo, then not bar, and failure. Here is your problem. The foo/bar relationship is the same, but not the return code, which is problematic in a Makefile, since it introduces a failure, thus make stops (see lintian about ignoring the errors in the clean target). Cheers, -- Cyril Brulebois pgpK2yQJ1P7Md.pgp Description: PGP signature
RFC: Exclude config.sub and config.guess from
Am Montag, den 11.02.2008, 14:45 +0100 schrieb David Paleino: Il giorno Mon, 11 Feb 2008 14:17:54 +0100 Daniel Leidert [EMAIL PROTECTED] ha scritto: We simply copy config.sub and config.guess into the build directory for some years now and I never observed any problem with this. I'm really wondering why you want to make the situation complicated? And if the config.{sub,guess} copied are different from those provided upstream, isn't this difference going to pollute the .diff.gz? I'd like to take the .diff.gz the most clean possible; i.e. only keep debian/ in it. I fully agree. But you already have a possibility to achieve this: Copy the config.* scripts after the clean target has been called (e.g. in the config.status target) then they are simply not part of the diff.gz. Of course they would be after a second build run. If you care and if you want to avoid this: preserve the original config.* scripts and put them back in the clean-target. This increases the whole debian/rules file for around 4 lines. This *is* much more easier than any other suggestion I read in this thread. A possible alternative could be to exclude config.sub and config.guess creating the .diff(.gz). But this can lead to problems, if you patched one of these files. IIRC I saw this during the introduction of kfreebsd-i386, but I'm not sure. Regards, Daniel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: RFC: Exclude config.sub and config.guess from
* Daniel Leidert [EMAIL PROTECTED] [080211 15:21]: If you care and if you want to avoid this: preserve the original config.* scripts and put them back in the clean-target. This increases the whole debian/rules file for around 4 lines. much easier: just delete in the clean target and put there at the beginning of the configuring target. Hochachtungsvoll, Bernhard R. Link -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: RFC: Exclude config.sub and config.guess from
Il giorno Mon, 11 Feb 2008 15:19:08 +0100 Daniel Leidert [EMAIL PROTECTED] ha scritto: Copy the config.* scripts after the clean target has been called (e.g. in the config.status target) then they are simply not part of the diff.gz. Of course they would be after a second build run. If you care and if you want to avoid this: preserve the original config.* scripts and put them back in the clean-target. This increases the whole debian/rules file for around 4 lines. This *is* much more easier than any other suggestion I read in this thread. Well, I tried to do that in one of my packages: ---8--- configure: [ ! -f $(CURDIR)/config.sub ] || \ mv $(CURDIR)/config.sub $(CURDIR)/config.sub.backup [ ! -f $(CURDIR)/config.guess ] || \ mv $(CURDIR)/config.guess $(CURDIR)/config.guess.backup [ ! -r /usr/share/misc/config.sub ] || \ cp /usr/share/misc/config.sub $(CURDIR)/ [ ! -r /usr/share/misc/config.guess ] || \ cp /usr/share/misc/config.guess $(CURDIR)/ ./configure --host=... ... clean: dh_testdir ... [ ! -f $(CURDIR)/config.sub.backup ] || \ mv $(CURDIR)/config.sub.backup $(CURDIR)/config.sub [ ! -f $(CURDIR)/config.guess.backup ] || \ mv $(CURDIR)/config.guess.backup $(CURDIR)/config.guess ---8--- This seems to me more hackish than it should; is there a cleaner way to do it (maybe I'm just complicating myself and don't see The Easy Way [1])? Cheers, David [1] I know that using [ ! test ] || ... is pretty awkward, but it didn't work with [ test ] . Maybe should be escaped somehow? I don't really know. -- . ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 | http://snipr.com/qa_page `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174 signature.asc Description: PGP signature