cvs diff: WWW Mmake files.

Tyson Richard DOWD trd at students.cs.mu.oz.au
Fri Feb 14 15:02:36 AEDT 1997


Hi Everyone!

Fergus, could you review this change?

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

Estimated hours taken: 0.5

Cleanup www Mmake files.

Mmake, */Mmake:
	Add .PHONY: ... targets to all non-file targets.
	(This increases efficiency of gmake, and avoids possible
	future conflicts with files of the same name).

papers/Mmake:
	Fix some bugs - install new files correctly, move files in
	correct directory.


Index: Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/Mmake,v
retrieving revision 1.5
diff -u -r1.5 Mmake
--- Mmake	1997/01/31 00:44:44	1.5
+++ Mmake	1997/02/14 03:34:58
@@ -18,37 +18,48 @@
 #-----------------------------------------------------------------------------#
 
 	# eventually, we might want to do some pre-processing here.
+.PHONY: all
 all:
 
+.PHONY: links
 links:
 	[ -f Welcome.html ] || ln -s index.html Welcome.html
 	[ -f mercury.html ] || ln -s index.html mercury.html
 
 #-----------------------------------------------------------------------------#
 
+.PHONY: install
 install: install_top install_subdirs
 
+.PHONY: install_top
 install_top: links
 	[ -d $(INSTALL_WEBDIR) ] || mkdir -p $(INSTALL_WEBDIR)
 	cp $(HTML) $(INSTALL_WEBDIR)
 
+.PHONY: install_subdirs
 install_subdirs: install_pics install_bench install_patches install_papers \
 		 install_doc install_mercury_docs
 
+.PHONY: install_bench
 install_bench:
 	cd bench && $(MMAKE) install
 
+.PHONY: install_patches
 install_patches:
 	cd patches && $(MMAKE) install
 
+.PHONY: install_papers
 install_papers:
 	cd papers && $(MMAKE) install
 
+.PHONY: install_doc
 install_doc:
 	cd doc && $(MMAKE) install
 
+.PHONY: install_mercury_docs
 install_mercury_docs:
 	cd ../doc && $(MMAKE) install_webpage
 
+.PHONY: install_pics
 install_pics:
 	cd pics && $(MMAKE) install
Index: bench/Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/bench/Mmake,v
retrieving revision 1.4
diff -u -r1.4 Mmake
--- Mmake	1997/01/31 00:44:57	1.4
+++ Mmake	1997/02/14 03:35:35
@@ -11,6 +11,7 @@
 
 HTML =  *.html
 
+.PHONY: install
 install:
 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
 	cp $(HTML) $(INSTALL_DIR)
Index: doc/Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/doc/Mmake,v
retrieving revision 1.3
diff -u -r1.3 Mmake
--- Mmake	1997/01/31 00:45:03	1.3
+++ Mmake	1997/02/14 03:35:48
@@ -10,6 +10,7 @@
 
 HTML =  documentation.html
 
+.PHONY: install
 install:
 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
 	cp $(HTML) $(INSTALL_DIR)
Index: papers/Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/papers/Mmake,v
retrieving revision 1.5
diff -u -r1.5 Mmake
--- Mmake	1997/02/12 23:42:30	1.5
+++ Mmake	1997/02/14 03:47:33
@@ -18,12 +18,18 @@
 	# turned off.  Hence, don't install the files unless they have
 	# changed.  (This avoids some permissions problems.)
 	for file in $(FILES); do 					\
-		if cmp $$file $(INSTALL_DIR)/$$file >/dev/null 2>&1; then \
+		if [ -f $(INSTALL_DIR)/$$file ] && 			\
+			cmp $$file $(INSTALL_DIR)/$$file >/dev/null 2>&1; then\
 			echo $$file unchanged;				\
 		else							\
-			echo $$file CHANGED;				\
-			(mv $$file $(INSTALL_DIR)/$$file.old &&		\
-			cp $$file $(INSTALL_DIR)/$$file) ||		\
+			if [ -f $(INSTALL_DIR)/$$file ] ; then		\
+				echo $$file CHANGED;			\
+				mv $(INSTALL_DIR)/$$file 		\
+					$(INSTALL_DIR)/$$file.old || exit 1;\
+			else						\
+				echo $$file NEW;			\
+			fi;						\
+			cp $$file $(INSTALL_DIR)/$$file ||		\
 			exit 1;						\
 		fi;							\
 	done
Index: patches/Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/patches/Mmake,v
retrieving revision 1.4
diff -u -r1.4 Mmake
--- Mmake	1997/01/31 00:45:08	1.4
+++ Mmake	1997/02/14 03:36:22
@@ -12,6 +12,7 @@
 
 FILES = patch-*
 
+.PHONY: install
 install:
 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
 	cp $(FILES) $(INSTALL_DIR)
Index: pics/Mmake
===================================================================
RCS file: /home/staff/zs/imp/www/pics/Mmake,v
retrieving revision 1.3
diff -u -r1.3 Mmake
--- Mmake	1997/01/31 00:45:10	1.3
+++ Mmake	1997/02/14 03:36:48
@@ -11,6 +11,7 @@
 
 FILES = *.jpg 
 
+.PHONY: install
 install:
 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
 	cp $(FILES) $(INSTALL_DIR)



More information about the developers mailing list