Patch for mktemp-1.5 could be improved

Bernard Leak bernard at
Fri Jun 24 07:23:21 PDT 2005

Dear List,
            this arose out of LFS Book 6.0
(though the patch I'm patching has apparently
not been changed since).

The 'add tempfile' patch for mktemp-1.5
is pointlessly broken if using a separate build directory.
(I've seen worse - the build instructions for libxml2-2.6.13
are fine for a separate directory for everything except the
testsuite - erm ... - but that's nothing to do with LFS).
Assuming that you aren't actually
allergic to separate build directories (me, I use them
whenever I can), I suggest modifying the patch file

where it says

+install-tempfile: tempfile
+    $(INSTALL) -m 0555 tempfile $(bindir)/tempfile

have instead

+install-tempfile: $(srcdir)/tempfile
+    $(INSTALL) -m 0555 $(srcdir)/tempfile $(bindir)/tempfile

All right, if you *insist* ... here's a diff you can give to 'patch':

diff -ru mktemp-1.5-add_tempfile-1.patch.old mktemp-1.5-add_tempfile-1.patch
--- mktemp-1.5-add_tempfile-1.patch.old 2005-04-20 13:59:23.187401832 +0100
+++ mktemp-1.5-add_tempfile-1.patch     2005-04-20 13:59:56.087400272 +0100
@@ -11,8 +11,8 @@
        $(INSTALL) -m 0444 $(srcdir)/$(PROG).$(mantype)
-+install-tempfile: tempfile
-+      $(INSTALL) -m 0555 tempfile $(bindir)/tempfile
++install-tempfile: $(srcdir)/tempfile
++      $(INSTALL) -m 0555 $(srcdir)/tempfile $(bindir)/tempfile
        @echo nothing to check

Bernard Leak. (bernard at brenda hyphen arkle dot demon dot co dot uk)
"Before they made me, they broke the mould"

More information about the lfs-dev mailing list