[m-dev.] diff: use $(CP) when installing

Peter Ross petdr at cs.mu.OZ.AU
Tue Dec 7 10:56:04 AEDT 1999


Hi,


===================================================================


Estimated hours taken: 0.25

w3/Makefile:
w3/Makefile.common:
w3/download/Makefile:
w3/htdig/Makefile:
w3/information/Makefile:
w3/mailing-lists/mercury-developers/Makefile:
w3/mailing-lists/mercury-users/Makefile:
    Use a variable for cp, so that we can change the flags passed to it
    easily.


Index: Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile	1999/12/06 23:24:21	1.11
+++ Makefile	1999/12/06 23:46:37
@@ -28,7 +28,7 @@
 install: local_install
 
 local_install:
-	cp -a images $(INSTALL_WEBDIR)
+	$(CP) images $(INSTALL_WEBDIR)
 	chgrp -R mercury $(INSTALL_WEBDIR)/images
 	chmod -R g+w,a+r $(INSTALL_WEBDIR)/images
 
Index: Makefile.common
===================================================================
RCS file: /home/staff/zs/imp/w3/Makefile.common,v
retrieving revision 1.11
diff -u -r1.11 Makefile.common
--- Makefile.common	1999/12/06 03:35:46	1.11
+++ Makefile.common	1999/12/06 23:50:13
@@ -5,6 +5,7 @@
 #-----------------------------------------------------------------------------#
 
 PHP3=/usr/lib/cgi-bin/php3 -q
+CP=cp -afu
 
 #-----------------------------------------------------------------------------#
 
@@ -43,12 +44,14 @@
 
 
 .PHONY: install
-install: $(HTML)
+install: html
 	[ -d $(INSTALL_WEBDIR) ] || mkdir -p $(INSTALL_WEBDIR)
-	cp -af $(HTML) $(INSTALL_WEBDIR)/
+	$(CP) $(HTML) $(INSTALL_WEBDIR)/
 ifdef DIRS
 	for dir in $(DIRS);						\
 	do				        			\
+		[ -d $(INSTALL_WEBDIR)/$$dir ] ||			\
+			mkdir -p $(INSTALL_WEBDIR)/$$dir;		\
 		(export INSTALL_WEBDIR=$(INSTALL_WEBDIR)/$$dir &&	\
 		cd $$dir && $(MAKE) install);				\
 	done
Index: download/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/download/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1998/11/17 15:35:19	1.4
+++ Makefile	1999/12/06 23:47:00
@@ -35,7 +35,7 @@
 local_install: all
 	for dir in patches;					\
 	do							\
-		cp -a $$dir $(INSTALL_WEBDIR);			\
+		$(CP) $$dir $(INSTALL_WEBDIR);			\
 		chmod -R a+r,g+w $(INSTALL_WEBDIR)/$$dir;	\
 		chgrp -R mercury $(INSTALL_WEBDIR)/$$dir;	\
 	done
Index: htdig/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/htdig/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/12/06 23:24:28	1.1
+++ Makefile	1999/12/06 23:48:03
@@ -21,7 +21,7 @@
 		header_and_footer.html
 
 local_install:
-	cp -af header.inc footer.inc $(INSTALL_WEBDIR)/
+	$(CP) header.inc footer.inc $(INSTALL_WEBDIR)/
 
 local_clean:
 	rm -f header.inc footer.inc
Index: information/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/information/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	1998/11/19 07:15:19	1.7
+++ Makefile	1999/12/06 23:47:27
@@ -23,15 +23,15 @@
 	echo "LIBRARY_DIR=`pwd`/library"  > Mmake.common
 	(cd notes; mmake MERCURY_DIR=.. )
 	(cd mercury-doc; mmake library-chapters.texi split_html ps)
-	cp -af notes/*.text doc
-	cp -af mercury-doc/*.html notes/*.html doc
-	cp -af mercury-doc/*.ps doc
+	$(CP) notes/*.text doc
+	$(CP) mercury-doc/*.html notes/*.html doc
+	$(CP) mercury-doc/*.ps doc
 	(cd doc; gzip -f -9 *.ps)
 
 local_install: all
 	for dir in bench developers doc papers;			\
 	do							\
-		cp -af $$dir $(INSTALL_WEBDIR);			\
+		$(CP) $$dir $(INSTALL_WEBDIR);			\
 		chmod -R a+r,g+w $(INSTALL_WEBDIR)/$$dir;	\
 		chgrp -R mercury $(INSTALL_WEBDIR)/$$dir;	\
 	done
Index: mailing-lists/mercury-developers/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/mercury-developers/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1998/11/19 06:02:44	1.6
+++ Makefile	1999/12/06 23:47:41
@@ -13,7 +13,7 @@
 	do							\
 		if [ -d $$dir -a $$dir != "include" ];		\
 		then						\
-			cp -af $$dir $(INSTALL_WEBDIR);		\
+			$(CP) $$dir $(INSTALL_WEBDIR);		\
 		fi						\
 	done
 	chmod -R a+r,g+w $(INSTALL_WEBDIR)/*
Index: mailing-lists/mercury-users/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/mercury-users/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1998/11/19 06:02:46	1.6
+++ Makefile	1999/12/06 23:47:52
@@ -11,7 +11,7 @@
 	do							\
 		if [ -d $$dir -a $$dir != "include" ];		\
 		then						\
-			cp -af $$dir $(INSTALL_WEBDIR);		\
+			$(CP) $$dir $(INSTALL_WEBDIR);		\
 		fi						\
 	done
 	chmod -R a+r,g+w $(INSTALL_WEBDIR)/*

----
 +----------------------------------------------------------------------+
 | Peter Ross      M Sci/Eng Melbourne Uni                              |
 | petdr at cs.mu.oz.au  WWW: www.cs.mu.oz.au/~petdr/ ph: +61 3 9344 9158  |
 +----------------------------------------------------------------------+
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list