From 0b9e5ea11a474c1d805ae1190ccb224685b40a8a Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Fri, 26 Mar 2010 11:48:23 +0100
Subject: [PATCH] ENH: link to general mplib* rules where possible.

ENH: generalize rule for X11

ENH: Avoid move in flex/flex++ rule.
---
 wmake/rules/General/X                         |  5 +++
 wmake/rules/General/flex                      |  2 +-
 wmake/rules/General/flex++                    |  2 +-
 wmake/rules/General/flex++.test               |  6 ----
 wmake/rules/{linux64Gcc42 => General}/mplib   |  0
 .../{linux64Gcc42 => General}/mplibGAMMA      |  0
 wmake/rules/General/mplibMPICH                |  2 +-
 .../{linux64Gcc42 => General}/mplibMPICH-GM   |  0
 .../mplibOPENMPI => General/mplibQSMPI}       |  3 +-
 wmake/rules/SiCortex64Gcc/flex++              |  2 +-
 wmake/rules/SiCortex64Gcc/mplib               |  4 +--
 wmake/rules/SunOS64Gcc/mplib                  |  4 +--
 wmake/rules/SunOS64Gcc/mplibOPENMPI           |  4 +--
 wmake/rules/linux64Gcc/X                      |  4 +--
 wmake/rules/linux64Gcc/mplib                  |  4 +--
 wmake/rules/linux64Gcc/mplibGAMMA             |  4 +--
 wmake/rules/linux64Gcc/mplibMPICH             |  4 +--
 wmake/rules/linux64Gcc/mplibMPICH-GM          |  4 +--
 wmake/rules/linux64Gcc/mplibOPENMPI           |  4 +--
 wmake/rules/linux64Gcc/mplibQSMPI             |  5 +--
 wmake/rules/linux64Gcc42/X                    |  3 --
 wmake/rules/linux64Gcc42/c                    | 16 ---------
 wmake/rules/linux64Gcc42/c++                  | 21 ------------
 wmake/rules/linux64Gcc42/c++Debug             |  2 --
 wmake/rules/linux64Gcc42/c++Opt               |  4 ---
 wmake/rules/linux64Gcc42/c++Prof              |  2 --
 wmake/rules/linux64Gcc42/cDebug               |  2 --
 wmake/rules/linux64Gcc42/cOpt                 |  2 --
 wmake/rules/linux64Gcc42/cProf                |  2 --
 wmake/rules/linux64Gcc42/general              | 10 ------
 wmake/rules/linux64Gcc42/mplibHPMPI           |  3 --
 wmake/rules/linux64Gcc42/mplibMPICH           |  3 --
 wmake/rules/linux64Gcc42/mplibOPENMPI         |  3 --
 wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI   |  1 -
 wmake/rules/linux64Gcc43/X                    |  4 +--
 wmake/rules/linux64Gcc43/mplib                |  4 +--
 wmake/rules/linux64Gcc43/mplibGAMMA           |  4 +--
 wmake/rules/linux64Gcc43/mplibMPICH           |  4 +--
 wmake/rules/linux64Gcc43/mplibMPICH-GM        |  4 +--
 wmake/rules/linux64Gcc43/mplibOPENMPI         |  4 +--
 wmake/rules/linux64Gcc43/mplibQSMPI           |  5 +--
 wmake/rules/linux64Gcc44/X                    |  4 +--
 wmake/rules/linux64Gcc44/mplib                |  4 +--
 wmake/rules/linux64Gcc44/mplibGAMMA           |  4 +--
 wmake/rules/linux64Gcc44/mplibMPICH           |  4 +--
 wmake/rules/linux64Gcc44/mplibMPICH-GM        |  4 +--
 wmake/rules/linux64Gcc44/mplibOPENMPI         |  4 +--
 wmake/rules/linux64Gcc44/mplibQSMPI           |  5 +--
 wmake/rules/linux64Icc/X                      |  4 +--
 wmake/rules/linux64Icc/mplib                  |  4 +--
 wmake/rules/linux64Icc/mplibMPICH             |  4 +--
 wmake/rules/linux64Icc/mplibOPENMPI           |  4 +--
 wmake/rules/linuxGcc/X                        |  4 +--
 wmake/rules/linuxGcc/mplib                    |  4 +--
 wmake/rules/linuxGcc/mplibGAMMA               |  4 +--
 wmake/rules/linuxGcc/mplibMPICH               |  4 +--
 wmake/rules/linuxGcc/mplibMPICH-GM            |  4 +--
 wmake/rules/linuxGcc/mplibOPENMPI             |  4 +--
 wmake/rules/linuxGcc42/X                      |  3 --
 wmake/rules/linuxGcc42/c                      | 16 ---------
 wmake/rules/linuxGcc42/c++                    | 21 ------------
 wmake/rules/linuxGcc42/c++Debug               |  2 --
 wmake/rules/linuxGcc42/c++Opt                 |  2 --
 wmake/rules/linuxGcc42/c++Prof                |  2 --
 wmake/rules/linuxGcc42/cDebug                 |  2 --
 wmake/rules/linuxGcc42/cOpt                   |  2 --
 wmake/rules/linuxGcc42/cProf                  |  2 --
 wmake/rules/linuxGcc42/general                | 10 ------
 wmake/rules/linuxGcc42/mplib                  |  3 --
 wmake/rules/linuxGcc42/mplibGAMMA             |  3 --
 wmake/rules/linuxGcc42/mplibHPMPI             |  3 --
 wmake/rules/linuxGcc42/mplibMPICH             |  3 --
 wmake/rules/linuxGcc42/mplibMPICH-GM          |  3 --
 wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI     |  1 -
 wmake/rules/linuxGcc43/X                      |  4 +--
 wmake/rules/linuxGcc43/mplib                  |  4 +--
 wmake/rules/linuxGcc43/mplibGAMMA             |  4 +--
 wmake/rules/linuxGcc43/mplibMPICH             |  4 +--
 wmake/rules/linuxGcc43/mplibMPICH-GM          |  4 +--
 wmake/rules/linuxGcc43/mplibOPENMPI           |  4 +--
 wmake/rules/linuxGcc44/X                      |  4 +--
 wmake/rules/linuxGcc44/mplib                  |  4 +--
 wmake/rules/linuxGcc44/mplibGAMMA             |  4 +--
 wmake/rules/linuxGcc44/mplibMPICH             |  4 +--
 wmake/rules/linuxGcc44/mplibMPICH-GM          |  4 +--
 wmake/rules/linuxGcc44/mplibOPENMPI           |  4 +--
 wmake/rules/linuxIA64Gcc/mplib                |  4 +--
 wmake/rules/linuxIA64Gcc/mplibMPICH           |  4 +--
 wmake/rules/linuxIA64Gcc/mplibOPENMPI         |  4 +--
 wmake/rules/linuxIA64Icc/mplib                |  4 +--
 wmake/rules/linuxIA64Icc/mplibMPICH           |  4 +--
 wmake/rules/linuxIA64Icc/mplibOPENMPI         |  4 +--
 wmake/rules/linuxIcc/X                        |  4 +--
 wmake/rules/linuxIcc/mplib                    |  4 +--
 wmake/rules/linuxIcc/mplibMPICH               |  4 +--
 wmake/rules/linuxIcc/mplibOPENMPI             |  4 +--
 wmake/rules/linuxPPC64Gcc/mplib               |  4 +--
 wmake/rules/linuxPPC64Gcc/mplibGAMMA          |  4 +--
 wmake/rules/linuxPPC64Gcc/mplibMPICH          |  4 +--
 wmake/rules/linuxPPC64Gcc/mplibMPICH-GM       |  4 +--
 wmake/rules/linuxPPC64Gcc/mplibOPENMPI        |  4 +--
 wmake/rules/linuxPPC64Gcc/mplibQSMPI          |  5 +--
 wmake/rules/linuxmingw32/general              | 11 ++-----
 wmake/rules/linuxmingw32/mplib                |  4 +--
 wmake/rules/linuxmingw32/mplibGAMMA           |  4 +--
 wmake/rules/linuxmingw32/mplibMPICH           |  4 +--
 wmake/rules/linuxmingw32/mplibMPICH-GM        |  4 +--
 wmake/rules/linuxmingw32/mplibOPENMPI         |  4 +--
 wmake/rules/solarisGcc/mplib                  |  4 +--
 wmake/rules/solarisGcc/mplibMPICH             |  2 +-
 wmake/rules/solarisGcc/mplibOPENMPI           |  4 +--
 wmake/scripts/makeDerivedFiles                |  2 +-
 wmake/scripts/makeFiles                       | 33 +++++++++----------
 wmake/scripts/makeOptions                     |  6 ++--
 114 files changed, 102 insertions(+), 406 deletions(-)
 create mode 100644 wmake/rules/General/X
 delete mode 100644 wmake/rules/General/flex++.test
 rename wmake/rules/{linux64Gcc42 => General}/mplib (100%)
 rename wmake/rules/{linux64Gcc42 => General}/mplibGAMMA (100%)
 rename wmake/rules/{linux64Gcc42 => General}/mplibMPICH-GM (100%)
 rename wmake/rules/{linuxGcc42/mplibOPENMPI => General/mplibQSMPI} (71%)
 mode change 100644 => 120000 wmake/rules/SiCortex64Gcc/mplib
 mode change 100644 => 120000 wmake/rules/SunOS64Gcc/mplib
 mode change 100644 => 120000 wmake/rules/SunOS64Gcc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc/X
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplib
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc/mplibQSMPI
 delete mode 100644 wmake/rules/linux64Gcc42/X
 delete mode 100644 wmake/rules/linux64Gcc42/c
 delete mode 100644 wmake/rules/linux64Gcc42/c++
 delete mode 100644 wmake/rules/linux64Gcc42/c++Debug
 delete mode 100644 wmake/rules/linux64Gcc42/c++Opt
 delete mode 100644 wmake/rules/linux64Gcc42/c++Prof
 delete mode 100644 wmake/rules/linux64Gcc42/cDebug
 delete mode 100644 wmake/rules/linux64Gcc42/cOpt
 delete mode 100644 wmake/rules/linux64Gcc42/cProf
 delete mode 100644 wmake/rules/linux64Gcc42/general
 delete mode 100644 wmake/rules/linux64Gcc42/mplibHPMPI
 delete mode 100644 wmake/rules/linux64Gcc42/mplibMPICH
 delete mode 100644 wmake/rules/linux64Gcc42/mplibOPENMPI
 delete mode 120000 wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/X
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplib
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc43/mplibQSMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/X
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplib
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linux64Gcc44/mplibQSMPI
 mode change 100644 => 120000 wmake/rules/linux64Icc/X
 mode change 100644 => 120000 wmake/rules/linux64Icc/mplib
 mode change 100644 => 120000 wmake/rules/linux64Icc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linux64Icc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxGcc/X
 mode change 100644 => 120000 wmake/rules/linuxGcc/mplib
 mode change 100644 => 120000 wmake/rules/linuxGcc/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linuxGcc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxGcc/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linuxGcc/mplibOPENMPI
 delete mode 100644 wmake/rules/linuxGcc42/X
 delete mode 100644 wmake/rules/linuxGcc42/c
 delete mode 100644 wmake/rules/linuxGcc42/c++
 delete mode 100644 wmake/rules/linuxGcc42/c++Debug
 delete mode 100644 wmake/rules/linuxGcc42/c++Opt
 delete mode 100644 wmake/rules/linuxGcc42/c++Prof
 delete mode 100644 wmake/rules/linuxGcc42/cDebug
 delete mode 100644 wmake/rules/linuxGcc42/cOpt
 delete mode 100644 wmake/rules/linuxGcc42/cProf
 delete mode 100644 wmake/rules/linuxGcc42/general
 delete mode 100644 wmake/rules/linuxGcc42/mplib
 delete mode 100644 wmake/rules/linuxGcc42/mplibGAMMA
 delete mode 100644 wmake/rules/linuxGcc42/mplibHPMPI
 delete mode 100644 wmake/rules/linuxGcc42/mplibMPICH
 delete mode 100644 wmake/rules/linuxGcc42/mplibMPICH-GM
 delete mode 120000 wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxGcc43/X
 mode change 100644 => 120000 wmake/rules/linuxGcc43/mplib
 mode change 100644 => 120000 wmake/rules/linuxGcc43/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linuxGcc43/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxGcc43/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linuxGcc43/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxGcc44/X
 mode change 100644 => 120000 wmake/rules/linuxGcc44/mplib
 mode change 100644 => 120000 wmake/rules/linuxGcc44/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linuxGcc44/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxGcc44/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linuxGcc44/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxIA64Gcc/mplib
 mode change 100644 => 120000 wmake/rules/linuxIA64Gcc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxIA64Gcc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxIA64Icc/mplib
 mode change 100644 => 120000 wmake/rules/linuxIA64Icc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxIA64Icc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxIcc/X
 mode change 100644 => 120000 wmake/rules/linuxIcc/mplib
 mode change 100644 => 120000 wmake/rules/linuxIcc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxIcc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplib
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/linuxPPC64Gcc/mplibQSMPI
 mode change 100644 => 120000 wmake/rules/linuxmingw32/mplib
 mode change 100644 => 120000 wmake/rules/linuxmingw32/mplibGAMMA
 mode change 100644 => 120000 wmake/rules/linuxmingw32/mplibMPICH
 mode change 100644 => 120000 wmake/rules/linuxmingw32/mplibMPICH-GM
 mode change 100644 => 120000 wmake/rules/linuxmingw32/mplibOPENMPI
 mode change 100644 => 120000 wmake/rules/solarisGcc/mplib
 mode change 100644 => 120000 wmake/rules/solarisGcc/mplibOPENMPI

diff --git a/wmake/rules/General/X b/wmake/rules/General/X
new file mode 100644
index 00000000000..f55fa8b32cd
--- /dev/null
+++ b/wmake/rules/General/X
@@ -0,0 +1,5 @@
+# X11 includes and libraries in the standard location
+#
+XFLAGS     =
+XINC       = $(XFLAGS) -I/usr/include/X11
+XLIBS      = -lXext -lX11
diff --git a/wmake/rules/General/flex b/wmake/rules/General/flex
index 06defbb03d3..7f726b34c49 100644
--- a/wmake/rules/General/flex
+++ b/wmake/rules/General/flex
@@ -1,6 +1,6 @@
 .SUFFIXES: .l
 
-ltoo = flex $$SOURCE ; mv lex.yy.c $*.c ; $(cc) $(cFLAGS) -c $*.c -o $@ 
+ltoo = flex -o $*.c $$SOURCE ; $(cc) $(cFLAGS) -c $*.c -o $@
 
 .l.dep:
 	$(MAKE_DEP)
diff --git a/wmake/rules/General/flex++ b/wmake/rules/General/flex++
index 304b131c6dc..7e7142aa539 100644
--- a/wmake/rules/General/flex++
+++ b/wmake/rules/General/flex++
@@ -1,6 +1,6 @@
 .SUFFIXES: .L
 
-Ltoo = flex -+ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
+Ltoo = flex -+ -o $*.C -f $$SOURCE ; $(CC) $(c++FLAGS) -c $*.C -o $@
 
 .L.dep:
 	$(MAKE_DEP)
diff --git a/wmake/rules/General/flex++.test b/wmake/rules/General/flex++.test
deleted file mode 100644
index 8503e579056..00000000000
--- a/wmake/rules/General/flex++.test
+++ /dev/null
@@ -1,6 +0,0 @@
-.SUFFIXES: .L
-
-Ltoo = flex++ $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@ 
-
-.L.dep:
-	$(MAKE_DEP)
diff --git a/wmake/rules/linux64Gcc42/mplib b/wmake/rules/General/mplib
similarity index 100%
rename from wmake/rules/linux64Gcc42/mplib
rename to wmake/rules/General/mplib
diff --git a/wmake/rules/linux64Gcc42/mplibGAMMA b/wmake/rules/General/mplibGAMMA
similarity index 100%
rename from wmake/rules/linux64Gcc42/mplibGAMMA
rename to wmake/rules/General/mplibGAMMA
diff --git a/wmake/rules/General/mplibMPICH b/wmake/rules/General/mplibMPICH
index ac17f7c1d2e..e5a38a8e381 100644
--- a/wmake/rules/General/mplibMPICH
+++ b/wmake/rules/General/mplibMPICH
@@ -1,3 +1,3 @@
-PFLAGS     = 
+PFLAGS     = -DMPICH_SKIP_MPICXX
 PINC       = -I$(MPI_ARCH_PATH)/include
 PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Gcc42/mplibMPICH-GM b/wmake/rules/General/mplibMPICH-GM
similarity index 100%
rename from wmake/rules/linux64Gcc42/mplibMPICH-GM
rename to wmake/rules/General/mplibMPICH-GM
diff --git a/wmake/rules/linuxGcc42/mplibOPENMPI b/wmake/rules/General/mplibQSMPI
similarity index 71%
rename from wmake/rules/linuxGcc42/mplibOPENMPI
rename to wmake/rules/General/mplibQSMPI
index 834d2d3e22a..95ea327379f 100644
--- a/wmake/rules/linuxGcc42/mplibOPENMPI
+++ b/wmake/rules/General/mplibQSMPI
@@ -1,3 +1,4 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
+PFLAGS     =
 PINC       = -I$(MPI_ARCH_PATH)/include
 PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
+
diff --git a/wmake/rules/SiCortex64Gcc/flex++ b/wmake/rules/SiCortex64Gcc/flex++
index d745628aab8..69d6f37319a 100644
--- a/wmake/rules/SiCortex64Gcc/flex++
+++ b/wmake/rules/SiCortex64Gcc/flex++
@@ -1,6 +1,6 @@
 .SUFFIXES: .L
 
-Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@ 
+Ltoo = flex --c++ -o $*.C -f $$SOURCE ; $(CC) $(c++FLAGS) -c $*.C -o $@
 
 .L.dep:
 	$(MAKE_DEP)
diff --git a/wmake/rules/SiCortex64Gcc/mplib b/wmake/rules/SiCortex64Gcc/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/SiCortex64Gcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/SiCortex64Gcc/mplib b/wmake/rules/SiCortex64Gcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/SiCortex64Gcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/SunOS64Gcc/mplib b/wmake/rules/SunOS64Gcc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/SunOS64Gcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/SunOS64Gcc/mplib b/wmake/rules/SunOS64Gcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/SunOS64Gcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/SunOS64Gcc/mplibOPENMPI b/wmake/rules/SunOS64Gcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/SunOS64Gcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/SunOS64Gcc/mplibOPENMPI b/wmake/rules/SunOS64Gcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/SunOS64Gcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/X b/wmake/rules/linux64Gcc/X
deleted file mode 100644
index 47480abd229..00000000000
--- a/wmake/rules/linux64Gcc/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/include/X11
-XLIBS      = -L/usr/lib64 -lXext -lX11
diff --git a/wmake/rules/linux64Gcc/X b/wmake/rules/linux64Gcc/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linux64Gcc/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplib b/wmake/rules/linux64Gcc/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linux64Gcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linux64Gcc/mplib b/wmake/rules/linux64Gcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplibGAMMA b/wmake/rules/linux64Gcc/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linux64Gcc/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linux64Gcc/mplibGAMMA b/wmake/rules/linux64Gcc/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplibMPICH b/wmake/rules/linux64Gcc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linux64Gcc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Gcc/mplibMPICH b/wmake/rules/linux64Gcc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplibMPICH-GM b/wmake/rules/linux64Gcc/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linux64Gcc/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linux64Gcc/mplibMPICH-GM b/wmake/rules/linux64Gcc/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplibOPENMPI b/wmake/rules/linux64Gcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linux64Gcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linux64Gcc/mplibOPENMPI b/wmake/rules/linux64Gcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/mplibQSMPI b/wmake/rules/linux64Gcc/mplibQSMPI
deleted file mode 100644
index 95ea327379f..00000000000
--- a/wmake/rules/linux64Gcc/mplibQSMPI
+++ /dev/null
@@ -1,4 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
-
diff --git a/wmake/rules/linux64Gcc/mplibQSMPI b/wmake/rules/linux64Gcc/mplibQSMPI
new file mode 120000
index 00000000000..d3446c68f17
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibQSMPI
@@ -0,0 +1 @@
+../General/mplibQSMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc42/X b/wmake/rules/linux64Gcc42/X
deleted file mode 100644
index 5d1f9c5cc54..00000000000
--- a/wmake/rules/linux64Gcc42/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib64 -lXext -lX11
diff --git a/wmake/rules/linux64Gcc42/c b/wmake/rules/linux64Gcc42/c
deleted file mode 100644
index 80bb80f32f7..00000000000
--- a/wmake/rules/linux64Gcc42/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m64
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linux64Gcc42/c++ b/wmake/rules/linux64Gcc42/c++
deleted file mode 100644
index 677b1e5bb47..00000000000
--- a/wmake/rules/linux64Gcc42/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m64
-
-include $(RULES)/c++$(WM_COMPILE_OPTION)
-
-ptFLAGS     = -DNoRepository -ftemplate-depth-60
-
-c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS)
diff --git a/wmake/rules/linux64Gcc42/c++Debug b/wmake/rules/linux64Gcc42/c++Debug
deleted file mode 100644
index 19bdb9c3346..00000000000
--- a/wmake/rules/linux64Gcc42/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linux64Gcc42/c++Opt b/wmake/rules/linux64Gcc42/c++Opt
deleted file mode 100644
index 3446f7f58cb..00000000000
--- a/wmake/rules/linux64Gcc42/c++Opt
+++ /dev/null
@@ -1,4 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
-#c++OPT      = -march=nocona -O3
-# -ftree-vectorize -ftree-vectorizer-verbose=3
diff --git a/wmake/rules/linux64Gcc42/c++Prof b/wmake/rules/linux64Gcc42/c++Prof
deleted file mode 100644
index 3bda4dad55e..00000000000
--- a/wmake/rules/linux64Gcc42/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linux64Gcc42/cDebug b/wmake/rules/linux64Gcc42/cDebug
deleted file mode 100644
index 72b638f4582..00000000000
--- a/wmake/rules/linux64Gcc42/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linux64Gcc42/cOpt b/wmake/rules/linux64Gcc42/cOpt
deleted file mode 100644
index 17318709f1f..00000000000
--- a/wmake/rules/linux64Gcc42/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linux64Gcc42/cProf b/wmake/rules/linux64Gcc42/cProf
deleted file mode 100644
index ca3ac9bf5f0..00000000000
--- a/wmake/rules/linux64Gcc42/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linux64Gcc42/general b/wmake/rules/linux64Gcc42/general
deleted file mode 100644
index d70a77cdb03..00000000000
--- a/wmake/rules/linux64Gcc42/general
+++ /dev/null
@@ -1,10 +0,0 @@
-CPP        = /lib/cpp $(GFLAGS)
-LD         = ld -A64
-
-PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linux64Gcc42/mplibHPMPI b/wmake/rules/linux64Gcc42/mplibHPMPI
deleted file mode 100644
index 574492a236a..00000000000
--- a/wmake/rules/linux64Gcc42/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi
diff --git a/wmake/rules/linux64Gcc42/mplibMPICH b/wmake/rules/linux64Gcc42/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linux64Gcc42/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Gcc42/mplibOPENMPI b/wmake/rules/linux64Gcc42/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linux64Gcc42/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI
deleted file mode 120000
index cc63a574c36..00000000000
--- a/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI
+++ /dev/null
@@ -1 +0,0 @@
-../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/X b/wmake/rules/linux64Gcc43/X
deleted file mode 100644
index 5d1f9c5cc54..00000000000
--- a/wmake/rules/linux64Gcc43/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib64 -lXext -lX11
diff --git a/wmake/rules/linux64Gcc43/X b/wmake/rules/linux64Gcc43/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplib b/wmake/rules/linux64Gcc43/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linux64Gcc43/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linux64Gcc43/mplib b/wmake/rules/linux64Gcc43/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplibGAMMA b/wmake/rules/linux64Gcc43/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linux64Gcc43/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linux64Gcc43/mplibGAMMA b/wmake/rules/linux64Gcc43/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplibMPICH b/wmake/rules/linux64Gcc43/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linux64Gcc43/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Gcc43/mplibMPICH b/wmake/rules/linux64Gcc43/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplibMPICH-GM b/wmake/rules/linux64Gcc43/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linux64Gcc43/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linux64Gcc43/mplibMPICH-GM b/wmake/rules/linux64Gcc43/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplibOPENMPI b/wmake/rules/linux64Gcc43/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linux64Gcc43/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linux64Gcc43/mplibOPENMPI b/wmake/rules/linux64Gcc43/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc43/mplibQSMPI b/wmake/rules/linux64Gcc43/mplibQSMPI
deleted file mode 100644
index 95ea327379f..00000000000
--- a/wmake/rules/linux64Gcc43/mplibQSMPI
+++ /dev/null
@@ -1,4 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
-
diff --git a/wmake/rules/linux64Gcc43/mplibQSMPI b/wmake/rules/linux64Gcc43/mplibQSMPI
new file mode 120000
index 00000000000..d3446c68f17
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibQSMPI
@@ -0,0 +1 @@
+../General/mplibQSMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/X b/wmake/rules/linux64Gcc44/X
deleted file mode 100644
index 5d1f9c5cc54..00000000000
--- a/wmake/rules/linux64Gcc44/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib64 -lXext -lX11
diff --git a/wmake/rules/linux64Gcc44/X b/wmake/rules/linux64Gcc44/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplib b/wmake/rules/linux64Gcc44/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linux64Gcc44/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linux64Gcc44/mplib b/wmake/rules/linux64Gcc44/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibGAMMA b/wmake/rules/linux64Gcc44/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linux64Gcc44/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linux64Gcc44/mplibGAMMA b/wmake/rules/linux64Gcc44/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibMPICH b/wmake/rules/linux64Gcc44/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linux64Gcc44/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Gcc44/mplibMPICH b/wmake/rules/linux64Gcc44/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibMPICH-GM b/wmake/rules/linux64Gcc44/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linux64Gcc44/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linux64Gcc44/mplibMPICH-GM b/wmake/rules/linux64Gcc44/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibOPENMPI b/wmake/rules/linux64Gcc44/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linux64Gcc44/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linux64Gcc44/mplibOPENMPI b/wmake/rules/linux64Gcc44/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibQSMPI b/wmake/rules/linux64Gcc44/mplibQSMPI
deleted file mode 100644
index 95ea327379f..00000000000
--- a/wmake/rules/linux64Gcc44/mplibQSMPI
+++ /dev/null
@@ -1,4 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
-
diff --git a/wmake/rules/linux64Gcc44/mplibQSMPI b/wmake/rules/linux64Gcc44/mplibQSMPI
new file mode 120000
index 00000000000..d3446c68f17
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibQSMPI
@@ -0,0 +1 @@
+../General/mplibQSMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/X b/wmake/rules/linux64Icc/X
deleted file mode 100644
index 5d1f9c5cc54..00000000000
--- a/wmake/rules/linux64Icc/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib64 -lXext -lX11
diff --git a/wmake/rules/linux64Icc/X b/wmake/rules/linux64Icc/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linux64Icc/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/mplib b/wmake/rules/linux64Icc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linux64Icc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linux64Icc/mplib b/wmake/rules/linux64Icc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linux64Icc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/mplibMPICH b/wmake/rules/linux64Icc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linux64Icc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linux64Icc/mplibMPICH b/wmake/rules/linux64Icc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linux64Icc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/mplibOPENMPI b/wmake/rules/linux64Icc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linux64Icc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linux64Icc/mplibOPENMPI b/wmake/rules/linux64Icc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linux64Icc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/X b/wmake/rules/linuxGcc/X
deleted file mode 100644
index bed8bfeddf5..00000000000
--- a/wmake/rules/linuxGcc/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib -lXext -lX11
diff --git a/wmake/rules/linuxGcc/X b/wmake/rules/linuxGcc/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linuxGcc/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/mplib b/wmake/rules/linuxGcc/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linuxGcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linuxGcc/mplib b/wmake/rules/linuxGcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/mplibGAMMA b/wmake/rules/linuxGcc/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linuxGcc/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxGcc/mplibGAMMA b/wmake/rules/linuxGcc/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/mplibMPICH b/wmake/rules/linuxGcc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxGcc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxGcc/mplibMPICH b/wmake/rules/linuxGcc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/mplibMPICH-GM b/wmake/rules/linuxGcc/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxGcc/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxGcc/mplibMPICH-GM b/wmake/rules/linuxGcc/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/mplibOPENMPI b/wmake/rules/linuxGcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxGcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxGcc/mplibOPENMPI b/wmake/rules/linuxGcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc42/X b/wmake/rules/linuxGcc42/X
deleted file mode 100644
index bed8bfeddf5..00000000000
--- a/wmake/rules/linuxGcc42/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib -lXext -lX11
diff --git a/wmake/rules/linuxGcc42/c b/wmake/rules/linuxGcc42/c
deleted file mode 100644
index 8db5da10479..00000000000
--- a/wmake/rules/linuxGcc42/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m32
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linuxGcc42/c++ b/wmake/rules/linuxGcc42/c++
deleted file mode 100644
index 32d12ad9de4..00000000000
--- a/wmake/rules/linuxGcc42/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m32
-
-include $(RULES)/c++$(WM_COMPILE_OPTION)
-
-ptFLAGS     = -DNoRepository -ftemplate-depth-60
-
-c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -pthread
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS)
diff --git a/wmake/rules/linuxGcc42/c++Debug b/wmake/rules/linuxGcc42/c++Debug
deleted file mode 100644
index 19bdb9c3346..00000000000
--- a/wmake/rules/linuxGcc42/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linuxGcc42/c++Opt b/wmake/rules/linuxGcc42/c++Opt
deleted file mode 100644
index 2aedabd6280..00000000000
--- a/wmake/rules/linuxGcc42/c++Opt
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
diff --git a/wmake/rules/linuxGcc42/c++Prof b/wmake/rules/linuxGcc42/c++Prof
deleted file mode 100644
index 3bda4dad55e..00000000000
--- a/wmake/rules/linuxGcc42/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linuxGcc42/cDebug b/wmake/rules/linuxGcc42/cDebug
deleted file mode 100644
index 6c71ed93e8a..00000000000
--- a/wmake/rules/linuxGcc42/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -finline-functions
diff --git a/wmake/rules/linuxGcc42/cOpt b/wmake/rules/linuxGcc42/cOpt
deleted file mode 100644
index 17318709f1f..00000000000
--- a/wmake/rules/linuxGcc42/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linuxGcc42/cProf b/wmake/rules/linuxGcc42/cProf
deleted file mode 100644
index ca3ac9bf5f0..00000000000
--- a/wmake/rules/linuxGcc42/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linuxGcc42/general b/wmake/rules/linuxGcc42/general
deleted file mode 100644
index c300368ee66..00000000000
--- a/wmake/rules/linuxGcc42/general
+++ /dev/null
@@ -1,10 +0,0 @@
-CPP        = /lib/cpp $(GFLAGS)
-LD         = ld -melf_i386
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linuxGcc42/mplib b/wmake/rules/linuxGcc42/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linuxGcc42/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linuxGcc42/mplibGAMMA b/wmake/rules/linuxGcc42/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linuxGcc42/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxGcc42/mplibHPMPI b/wmake/rules/linuxGcc42/mplibHPMPI
deleted file mode 100644
index 8aff40632bd..00000000000
--- a/wmake/rules/linuxGcc42/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi
diff --git a/wmake/rules/linuxGcc42/mplibMPICH b/wmake/rules/linuxGcc42/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxGcc42/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxGcc42/mplibMPICH-GM b/wmake/rules/linuxGcc42/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxGcc42/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI
deleted file mode 120000
index cc63a574c36..00000000000
--- a/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI
+++ /dev/null
@@ -1 +0,0 @@
-../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/X b/wmake/rules/linuxGcc43/X
deleted file mode 100644
index bed8bfeddf5..00000000000
--- a/wmake/rules/linuxGcc43/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib -lXext -lX11
diff --git a/wmake/rules/linuxGcc43/X b/wmake/rules/linuxGcc43/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linuxGcc43/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplib b/wmake/rules/linuxGcc43/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linuxGcc43/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linuxGcc43/mplib b/wmake/rules/linuxGcc43/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplibGAMMA b/wmake/rules/linuxGcc43/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linuxGcc43/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxGcc43/mplibGAMMA b/wmake/rules/linuxGcc43/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplibMPICH b/wmake/rules/linuxGcc43/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxGcc43/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxGcc43/mplibMPICH b/wmake/rules/linuxGcc43/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplibMPICH-GM b/wmake/rules/linuxGcc43/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxGcc43/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxGcc43/mplibMPICH-GM b/wmake/rules/linuxGcc43/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplibOPENMPI b/wmake/rules/linuxGcc43/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxGcc43/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxGcc43/mplibOPENMPI b/wmake/rules/linuxGcc43/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/X b/wmake/rules/linuxGcc44/X
deleted file mode 100644
index bed8bfeddf5..00000000000
--- a/wmake/rules/linuxGcc44/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib -lXext -lX11
diff --git a/wmake/rules/linuxGcc44/X b/wmake/rules/linuxGcc44/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linuxGcc44/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplib b/wmake/rules/linuxGcc44/mplib
deleted file mode 100644
index 294bd861501..00000000000
--- a/wmake/rules/linuxGcc44/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       =
-PLIBS      =
diff --git a/wmake/rules/linuxGcc44/mplib b/wmake/rules/linuxGcc44/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplibGAMMA b/wmake/rules/linuxGcc44/mplibGAMMA
deleted file mode 100644
index 11606f29849..00000000000
--- a/wmake/rules/linuxGcc44/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxGcc44/mplibGAMMA b/wmake/rules/linuxGcc44/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplibMPICH b/wmake/rules/linuxGcc44/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxGcc44/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxGcc44/mplibMPICH b/wmake/rules/linuxGcc44/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplibMPICH-GM b/wmake/rules/linuxGcc44/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxGcc44/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxGcc44/mplibMPICH-GM b/wmake/rules/linuxGcc44/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplibOPENMPI b/wmake/rules/linuxGcc44/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxGcc44/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxGcc44/mplibOPENMPI b/wmake/rules/linuxGcc44/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Gcc/mplib b/wmake/rules/linuxIA64Gcc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linuxIA64Gcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linuxIA64Gcc/mplib b/wmake/rules/linuxIA64Gcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxIA64Gcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Gcc/mplibMPICH b/wmake/rules/linuxIA64Gcc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxIA64Gcc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxIA64Gcc/mplibMPICH b/wmake/rules/linuxIA64Gcc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxIA64Gcc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Gcc/mplibOPENMPI b/wmake/rules/linuxIA64Gcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxIA64Gcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxIA64Gcc/mplibOPENMPI b/wmake/rules/linuxIA64Gcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxIA64Gcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Icc/mplib b/wmake/rules/linuxIA64Icc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linuxIA64Icc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linuxIA64Icc/mplib b/wmake/rules/linuxIA64Icc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxIA64Icc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Icc/mplibMPICH b/wmake/rules/linuxIA64Icc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxIA64Icc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxIA64Icc/mplibMPICH b/wmake/rules/linuxIA64Icc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxIA64Icc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Icc/mplibOPENMPI b/wmake/rules/linuxIA64Icc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxIA64Icc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxIA64Icc/mplibOPENMPI b/wmake/rules/linuxIA64Icc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxIA64Icc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIcc/X b/wmake/rules/linuxIcc/X
deleted file mode 100644
index bed8bfeddf5..00000000000
--- a/wmake/rules/linuxIcc/X
+++ /dev/null
@@ -1,3 +0,0 @@
-XFLAGS     =
-XINC       = $(XFLAGS) -I/usr/X11R6/include
-XLIBS      = -L/usr/X11R6/lib -lXext -lX11
diff --git a/wmake/rules/linuxIcc/X b/wmake/rules/linuxIcc/X
new file mode 120000
index 00000000000..73572d6c04b
--- /dev/null
+++ b/wmake/rules/linuxIcc/X
@@ -0,0 +1 @@
+../General/X
\ No newline at end of file
diff --git a/wmake/rules/linuxIcc/mplib b/wmake/rules/linuxIcc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linuxIcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linuxIcc/mplib b/wmake/rules/linuxIcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxIcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxIcc/mplibMPICH b/wmake/rules/linuxIcc/mplibMPICH
deleted file mode 100644
index e5a38a8e381..00000000000
--- a/wmake/rules/linuxIcc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxIcc/mplibMPICH b/wmake/rules/linuxIcc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxIcc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxIcc/mplibOPENMPI b/wmake/rules/linuxIcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxIcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxIcc/mplibOPENMPI b/wmake/rules/linuxIcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxIcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplib b/wmake/rules/linuxPPC64Gcc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linuxPPC64Gcc/mplib b/wmake/rules/linuxPPC64Gcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibGAMMA b/wmake/rules/linuxPPC64Gcc/mplibGAMMA
deleted file mode 100644
index d62c6250ff4..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxPPC64Gcc/mplibGAMMA b/wmake/rules/linuxPPC64Gcc/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH b/wmake/rules/linuxPPC64Gcc/mplibMPICH
deleted file mode 100644
index ac17f7c1d2e..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH b/wmake/rules/linuxPPC64Gcc/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM b/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM b/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibOPENMPI b/wmake/rules/linuxPPC64Gcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxPPC64Gcc/mplibOPENMPI b/wmake/rules/linuxPPC64Gcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibQSMPI b/wmake/rules/linuxPPC64Gcc/mplibQSMPI
deleted file mode 100644
index 95ea327379f..00000000000
--- a/wmake/rules/linuxPPC64Gcc/mplibQSMPI
+++ /dev/null
@@ -1,4 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
-
diff --git a/wmake/rules/linuxPPC64Gcc/mplibQSMPI b/wmake/rules/linuxPPC64Gcc/mplibQSMPI
new file mode 120000
index 00000000000..d3446c68f17
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibQSMPI
@@ -0,0 +1 @@
+../General/mplibQSMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/general b/wmake/rules/linuxmingw32/general
index 6a37beabd47..bd79de9270a 100644
--- a/wmake/rules/linuxmingw32/general
+++ b/wmake/rules/linuxmingw32/general
@@ -3,16 +3,9 @@ LD         = mingw32-ld
 
 PROJECT_LIBS = -l$(WM_PROJECT)
 
-include $(RULES)/X
-
-include $(GENERAL_RULES)/sourceToDep
-
-include $(GENERAL_RULES)/flex
-include $(GENERAL_RULES)/flex++
-include $(GENERAL_RULES)/byacc
-include $(GENERAL_RULES)/btyacc++
-include $(GENERAL_RULES)/moc
+include $(GENERAL_RULES)/standard
 
+include $(RULES)/X
 include $(RULES)/c
 include $(RULES)/c++
 
diff --git a/wmake/rules/linuxmingw32/mplib b/wmake/rules/linuxmingw32/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/linuxmingw32/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/linuxmingw32/mplib b/wmake/rules/linuxmingw32/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/mplibGAMMA b/wmake/rules/linuxmingw32/mplibGAMMA
deleted file mode 100644
index d62c6250ff4..00000000000
--- a/wmake/rules/linuxmingw32/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/linuxmingw32/mplibGAMMA b/wmake/rules/linuxmingw32/mplibGAMMA
new file mode 120000
index 00000000000..4b41692bf62
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplibGAMMA
@@ -0,0 +1 @@
+../General/mplibGAMMA
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/mplibMPICH b/wmake/rules/linuxmingw32/mplibMPICH
deleted file mode 100644
index ac17f7c1d2e..00000000000
--- a/wmake/rules/linuxmingw32/mplibMPICH
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt
diff --git a/wmake/rules/linuxmingw32/mplibMPICH b/wmake/rules/linuxmingw32/mplibMPICH
new file mode 120000
index 00000000000..c83eb564e1b
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplibMPICH
@@ -0,0 +1 @@
+../General/mplibMPICH
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/mplibMPICH-GM b/wmake/rules/linuxmingw32/mplibMPICH-GM
deleted file mode 100644
index 88493ebc705..00000000000
--- a/wmake/rules/linuxmingw32/mplibMPICH-GM
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm
diff --git a/wmake/rules/linuxmingw32/mplibMPICH-GM b/wmake/rules/linuxmingw32/mplibMPICH-GM
new file mode 120000
index 00000000000..621d0857d32
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplibMPICH-GM
@@ -0,0 +1 @@
+../General/mplibMPICH-GM
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/mplibOPENMPI b/wmake/rules/linuxmingw32/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/linuxmingw32/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/linuxmingw32/mplibOPENMPI b/wmake/rules/linuxmingw32/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/solarisGcc/mplib b/wmake/rules/solarisGcc/mplib
deleted file mode 100644
index 8a84b401469..00000000000
--- a/wmake/rules/solarisGcc/mplib
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = 
-PINC       = 
-PLIBS      = 
diff --git a/wmake/rules/solarisGcc/mplib b/wmake/rules/solarisGcc/mplib
new file mode 120000
index 00000000000..1fa0d64ec89
--- /dev/null
+++ b/wmake/rules/solarisGcc/mplib
@@ -0,0 +1 @@
+../General/mplib
\ No newline at end of file
diff --git a/wmake/rules/solarisGcc/mplibMPICH b/wmake/rules/solarisGcc/mplibMPICH
index cd9ff0e4787..c4ef548d9a4 100644
--- a/wmake/rules/solarisGcc/mplibMPICH
+++ b/wmake/rules/solarisGcc/mplibMPICH
@@ -1,3 +1,3 @@
-PFLAGS     = 
+PFLAGS     = -DMPICH_SKIP_MPICXX
 PINC       = -I$(MPI_ARCH_PATH)/include
 PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt -laio
diff --git a/wmake/rules/solarisGcc/mplibOPENMPI b/wmake/rules/solarisGcc/mplibOPENMPI
deleted file mode 100644
index 834d2d3e22a..00000000000
--- a/wmake/rules/solarisGcc/mplibOPENMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DOMPI_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lmpi
diff --git a/wmake/rules/solarisGcc/mplibOPENMPI b/wmake/rules/solarisGcc/mplibOPENMPI
new file mode 120000
index 00000000000..2d938a16a6c
--- /dev/null
+++ b/wmake/rules/solarisGcc/mplibOPENMPI
@@ -0,0 +1 @@
+../General/mplibOPENMPI
\ No newline at end of file
diff --git a/wmake/scripts/makeDerivedFiles b/wmake/scripts/makeDerivedFiles
index 96377d68325..9d574fe0f9e 100755
--- a/wmake/scripts/makeDerivedFiles
+++ b/wmake/scripts/makeDerivedFiles
@@ -28,7 +28,7 @@
 #
 # Description
 #     Constructs all the file list for make given the source file list,
-#     written was by hand or using makeFilesAndOptions.
+#     written by hand or using makeFilesAndOptions.
 #
 #------------------------------------------------------------------------------
 
diff --git a/wmake/scripts/makeFiles b/wmake/scripts/makeFiles
index 8416970039a..14c09215155 100755
--- a/wmake/scripts/makeFiles
+++ b/wmake/scripts/makeFiles
@@ -35,41 +35,38 @@
 
 if [ -r Make/files ]
 then
-    echo "makeFiles: Make/files already exists, exiting"
+    echo "Error: Make/files already exists - exiting"
     exit 1
 fi
 
-bin=$WM_DIR/bin/$WM_ARCH$WM_COMPILER
+dirToString=$WM_DIR/bin/$WM_ARCH$WM_COMPILER/dirToString
 
 [ -d Make ] || mkdir Make
 rm -f Make/files
 
-dirs=`find . -name "*" -type d -print`
-
-for dir in $dirs
+for dir in `find . -type d -print`
 do
-    if [ $dir != . ]
-    then
+    case "$dir" in
+    . | ./Make | ./lnInclude )
+        # skip special directories
+        ;;
+    *)
         baseDir=`echo $dir | sed 's%^\./%%'`
-        baseDirName=`echo $baseDir | $bin/dirToString`
+        baseDirName=`echo $baseDir | $dirToString`
 
-        if [ $baseDirName != Make ]
-        then
-            echo $baseDirName " = " $baseDir >> Make/files
-        fi
-    fi
+        echo $baseDirName " = " $baseDir >> Make/files
+        ;;
+    esac
 done
 
 echo >> Make/files
 
-files=`find . -name "*.[cCylfF]" -type f  -print`
-
-for file in $files
+for file in `find . -name "*.[cCylLfF]" -type f -print`
 do
-    pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $bin/dirToString`
     fileName=`echo ${file##*/}`
+    pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $dirToString`
 
-    if [ "$pathName" != "" ]
+    if [ -n "$pathName" ]
     then
         echo '$('$pathName')/'$fileName >> Make/files
     else
diff --git a/wmake/scripts/makeOptions b/wmake/scripts/makeOptions
index 609a447ba0a..4d813840e0a 100755
--- a/wmake/scripts/makeOptions
+++ b/wmake/scripts/makeOptions
@@ -27,7 +27,7 @@
 #     makeOptions
 #
 # Description
-#     Scan the current directory for options and construct Make/options
+#     Construct Make/options
 #
 #     Usage : makeOptions
 #
@@ -35,8 +35,8 @@
 
 if [ -r Make/options ]
 then
-   echo "makeOptions: Make/options already exists, exiting"
-   exit 1
+    echo "Error: Make/options already exists - exiting"
+    exit 1
 fi
 
 [ -d Make ] || mkdir Make
-- 
GitLab