[m-rev.] for review 2/2: Rename the new Makefile
Paul Bone
paul at bone.id.au
Wed Apr 17 12:05:09 AEST 2013
For review by Peter Wang
Attn Peter, I've also merged master into redesign-proposal so that
redesign-proposal has recent changes to the main repository including news
items.
Thanks.
---
Rename the new Makefile
Makefile.new:
Make this 'Makefile' so that it works by default.
Makefile:
Deleted.
---
Makefile | 96 ++++++++++++++++++++----------------------------------------
Makefile.new | 51 --------------------------------
2 files changed, 32 insertions(+), 115 deletions(-)
delete mode 100644 Makefile.new
diff --git a/Makefile b/Makefile
index c2d74d5..2dae30e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,38 @@
#-----------------------------------------------------------------------------#
-# Copyright (C) 1998 University of Melbourne.
-# This file may only be copied under the terms of the GNU General
-# Public License - see the file COPYING in the Mercury distribution.
-#-----------------------------------------------------------------------------#
include RELEASE_INFO
-HTML= index.html \
- mcorba.html \
- news.html \
- information.html \
- backends.html \
- download.html \
- contact.html \
- dotnet.html \
- applications.html \
- contributions.html \
- search.html
+PHP = /usr/bin/php -q
-XML= rss.xml
+COMMON_INCS := \
+ include/globals.inc \
+ include/menubar.inc \
+ include/template.inc \
+ include/functions.inc \
+ include/footer.inc
-DIRS=contact download htdig information mailing-lists tutorial
-ROOT=.
+NEWS_INCS := \
+ include/latest_news.inc \
+ news/newsdb.inc
-#-----------------------------------------------------------------------------#
+PHPSRC := $(wildcard *.php */*.php)
+HTML := $(patsubst %.php,%.html,$(PHPSRC))
+XML := rss.xml
+
+.PHONY: html
+html: $(HTML) $(XML)
+
+%.html: %.php include/%.inc $(COMMON_INCS)
+ cd $(dir $@) && $(PHP) $(notdir $<) > $(notdir $@)
-target: html
+%.xml: %.php $(COMMON_INCS) $(NEWS_INCS)
+ $(PHP) $< > $@
-globals.inc: include/globals.inc
+index.html news.html: $(NEWS_INCS)
+
+mcorba.html: news/mcorba_newsdb.inc
+
+.PHONY: rss.html
include/globals.inc: include/globals.inc.in RELEASE_INFO
sed -e "s/<RELEASE_VERSION>/$(RELEASE_VERSION)/" \
@@ -35,49 +40,12 @@ include/globals.inc: include/globals.inc.in RELEASE_INFO
-e "s/<WWW_DOMAIN>/$(WWW_DOMAIN)/" \
< $< > $@
-index.html: latest_news.inc newsdb.inc
-news.html: latest_news.inc newsdb.inc
-mcorba.html: mcorba_newsdb.inc
-
-install: local_install
-
-# What is this in aid of? It doesn't make sense on the champagne server (at
-# the moment). So I commented it out.
-# local_install:
-# /bin/rm -rf "$(INSTALL_WEBDIR)/images"
-# $(CP) images $(INSTALL_WEBDIR)
-# chgrp -R mercury $(INSTALL_WEBDIR)/images
-# chmod -R g+w,a+rx $(INSTALL_WEBDIR)/images
+.PHONY: clean
+clean:
+ -$(RM) $(HTML) $(XML)
-clean: local_clean
+.PHONY: touch
+touch:
+ touch $(PHPSRC)
-local_clean:
- rm -f include/globals.inc rss.xml
-
-ROTD_PATTERNS = mercury-compiler-rotd-*-unstable.tar.gz \
- mercury-extras-rotd-*-unstable.tar.gz \
- mercury-tests-rotd-*-unstable.tar.gz \
- mercury-test-failures-rotd-*-unstable.txt \
- mercury-NEWS-rotd-*-unstable.txt \
- mercury-INSTALL-rotd-*-unstable.txt
-
-delete_old_rotds:
- for installed_path in $(BETA_WEBDIR) $(BETA_FTPDIR); \
- do \
- for pattern in $(ROTD_PATTERNS); \
- do \
- path_and_pattern="$$installed_path/$$pattern"; \
- num_matches=`ls $$path_and_pattern | wc -l`; \
- num_matches_minus_one=`expr $$num_matches - 1`; \
- ls -t $$path_and_pattern | \
- tail -n $$num_matches_minus_one /dev/stdin | \
- xargs rm -f ; \
- done; \
- done
-
-#-----------------------------------------------------------------------------#
-
-include Makefile.common
-
-#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
diff --git a/Makefile.new b/Makefile.new
deleted file mode 100644
index 2dae30e..0000000
--- a/Makefile.new
+++ /dev/null
@@ -1,51 +0,0 @@
-#-----------------------------------------------------------------------------#
-
-include RELEASE_INFO
-
-PHP = /usr/bin/php -q
-
-COMMON_INCS := \
- include/globals.inc \
- include/menubar.inc \
- include/template.inc \
- include/functions.inc \
- include/footer.inc
-
-NEWS_INCS := \
- include/latest_news.inc \
- news/newsdb.inc
-
-PHPSRC := $(wildcard *.php */*.php)
-HTML := $(patsubst %.php,%.html,$(PHPSRC))
-XML := rss.xml
-
-.PHONY: html
-html: $(HTML) $(XML)
-
-%.html: %.php include/%.inc $(COMMON_INCS)
- cd $(dir $@) && $(PHP) $(notdir $<) > $(notdir $@)
-
-%.xml: %.php $(COMMON_INCS) $(NEWS_INCS)
- $(PHP) $< > $@
-
-index.html news.html: $(NEWS_INCS)
-
-mcorba.html: news/mcorba_newsdb.inc
-
-.PHONY: rss.html
-
-include/globals.inc: include/globals.inc.in RELEASE_INFO
- sed -e "s/<RELEASE_VERSION>/$(RELEASE_VERSION)/" \
- -e "s/<NEXT_BETA_VERSION>/$(NEXT_BETA_VERSION)/" \
- -e "s/<WWW_DOMAIN>/$(WWW_DOMAIN)/" \
- < $< > $@
-
-.PHONY: clean
-clean:
- -$(RM) $(HTML) $(XML)
-
-.PHONY: touch
-touch:
- touch $(PHPSRC)
-
-#-----------------------------------------------------------------------------#
--
1.8.1.3
More information about the reviews
mailing list