[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] Feature request: option to keep (and reuse) t
From: |
Volker Grabsch |
Subject: |
Re: [Mingw-cross-env-list] Feature request: option to keep (and reuse) the tmp-<pkgname> directory |
Date: |
Sun, 26 Sep 2010 16:33:18 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Bart van Andel <address@hidden> schrieb:
> I'd like to see an option to disable the automated deletion of the
> tmp-<pkgname> directory,
This feature has been left out because it isn't really needed at all.
[ see below, (3) ]
> and possibly also enable its reuse, when it exists.
Reusing a failed tmp-* folder would allow for lots of subtle bugs.
In particular, rerunning ./configure is often a bad idea, and not
much slower than the "clean" way (removing everything, unpacking
archive, and _then_ running ./configure again).
If the ./configure was okay and your build failed at the "make"
step, note that you can usually just run the "make" command
manually, i.e.
cd tmp-PKG/*/
make
You can then modify the sources (or whatever you need) and run
"make" selectively only for the critical parts. When you are
done, modify the src/PKG.mk and rerun everything.
> This has some advantages e.g. for preparing new .mk files:
>
> (1) Unpacking the archive is only needed once.
Unpacking is usually not the time sink. Also note that copying
over a "clean" source directory is often slower than simply
unpacking it again.
> (2) Different options for e.g. configure can be tried within the
> tmp-<pkgname> directory quicker because of (1).
If it's just about rerunning ./configure, you should simply
run it manually within the tmp-PKG/*/ directory.
If it's about a _clean_ rerun of ./configure, re-unpacking the
source ball might actually be faster (see above).
> (3) In general, it makes debugging / tuning a package easier since all the
> files are kept even if the build completes successfully.
This is why I usually end my *.mk files with "exit 1":
define $(PKG)_BUILD
...
(incomplete build commands)
...
exit 1
endef
That way, a temporal build will always fail, keeping the tmp-*/
directory alive.
This method also saves me from accidently uploading incomplete *.mk
files, because they will always fail, so I won't accidently think of
them as being complete.
After I finally added the "$(MAKE) install" part and the test program,
I remove the "exit 1" command.
To summarize, I didn't implement a "keep tmp" feature because everytime
when I thought I need it, I found a better solution that is faster and/or
more reliable.
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR