[1142] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5b4pl3: include/krb5/Makefile.in should delete target

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Mon Mar 13 21:34:01 1995

From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Mon, 13 Mar 1995 21:37:09 -0500
To: krb5-bugs@MIT.EDU

There are two problems with the "install::" rule in
include/krb5/Makefile.in:

1) It uses "cp" to install files, without deleting the target first.
   Therefore, if the target is a read-only file, the copy will fail.
2) The line that installs config.h and osconf.h is just plain wrong,
   since it references the "$f" shell variable, but it'll probably
   work anyway, because "$f" is unset and therefore evaluates to an
   empty string, and thus the files are installed into the proper
   directory.  It should be fixed anyway.

Patch:

--- Makefile.in	1995/03/14 02:25:14	1.4
+++ Makefile.in	1995/03/14 02:35:12
@@ -27,9 +27,13 @@
 
 install:: $(KRB5_HEADERS) config.h osconf.h autoconf.h
 	@set -x; for f in $(KRB5_HEADERS) ; \
-	do cp $(srcdir)/$$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
+	do $(RM) $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f; \
+	   cp $(srcdir)/$$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
+	done
+	@set -x; for f in config.h osconf.h ; \
+	do $(RM) $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f; \
+	   cp $$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
 	done
-	cp config.h osconf.h $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f 
 
 PROCESS_REPLACE = -e "s+@KRB5ROOT+$(KRB5ROOT)+" \
 		  -e "s+@KDB5DIR+$(KDB5DIR)+" \

home help back first fref pref prev next nref lref last post