(all-local) [SECOND_PASS]: Rewrite to use 'make' itself
authorRaja R Harinath <harinath@hurrynot.org>
Fri, 7 May 2004 10:02:42 +0000 (10:02 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Fri, 7 May 2004 10:02:42 +0000 (10:02 -0000)
to determine out-of-date-ness.  (This fixes an unlogged change.)
(install-local,test-local,run-test-local,clean-local): Collapse
near-identical rules.

svn path=/trunk/mcs/; revision=26891

mcs/class/System/ChangeLog
mcs/class/System/Makefile

index 5b1216a9722ec2c8e5d17b1968a812f1b10c93f9..dddcc422d842077e3d64d50d389ee1b88f316646 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-07  Raja R Harinath  <rharinath@novell.com>
+
+       * Makefile (all-local) [SECOND_PASS]: Rewrite to use 'make' itself
+       to determine out-of-date-ness.  (This fixes an unlogged change.)
+       (install-local,test-local,run-test-local,clean-local): Collapse
+       near-identical rules.
+
 2004-05-07  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile (all-local): Built first pass with BOOT_COMPILE.
index feb12b2425d52d75efd2d20ef1b399b720b5a5c4..2e56af92471a38d51e1839c28f221e97ecbd41f0 100644 (file)
@@ -18,17 +18,13 @@ EXTRA_DISTFILES = \
        System.ComponentModel.Design/Changelog          \
        Test/test-config-file
 
-A_SYSTEM = ../lib/$(PROFILE)/System.dll
-A_SYSTEMXML = ../lib/$(PROFILE)/System.Xml.dll
-
 ifdef SECOND_PASS
        include ../../build/library.make
-all-local:
-       @if test ! -f $(A_SYSTEMXML) ; then exit 0; fi
-       @ if test $(A_SYSTEM) -ot $(A_SYSTEMXML) ; then \
-               rm -f $(A_SYSTEM); \
-               $(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/define:XML_DEP /r:$(CYCLIC_DEP)' || exit 1; \
-       fi
+
+ifdef HAVE_SYSTEM_XML
+$(the_lib): ../lib/$(PROFILE)/$(CYCLIC_DEP)
+endif
+
 else
 # First pass:
 #   1. Build temporary System.dll without depending on System.Xml.dll
@@ -36,25 +32,14 @@ else
 all-local:
        @if test ! -f ../lib/$(PROFILE)/$(CYCLIC_DEP) ; then \
            echo "Creating temporary $(LIBRARY) without $(CYCLIC_DEP) reference." ; \
-           rm -f $(A_SYSTEM); \
            $(MAKE) SECOND_PASS=yes CSCOMPILE='$(BOOT_COMPILE)' || exit 1 ; \
            rm -f '$(depsdir)/$(PROFILE)_$(LIBRARY).stamp'; \
        else \
-           $(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/define:XML_DEP /r:$(CYCLIC_DEP)' || exit 1; \
+           $(MAKE) SECOND_PASS=yes HAVE_SYSTEM_XML=yes EXTRA_FLAGS="/define:XML_DEP /r:$(CYCLIC_DEP)" || exit 1; \
        fi
 
-## TODO: how to do this without duplication
-
-install-local:
-           @$(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/r:$(CYCLIC_DEP)' install-local || exit 1; \
-           
 test-local: all-local
-           @$(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/r:$(CYCLIC_DEP)' test-local || exit 1; \
-           
-run-test-local:
-           @$(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/r:$(CYCLIC_DEP)' run-test-local || exit 1; \
-           
-clean-local:
-           @$(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/r:$(CYCLIC_DEP)' clean-local || exit 1; \
-           
+
+install-local test-local run-test-local clean-local:
+           $(MAKE) SECOND_PASS=yes EXTRA_FLAGS='/r:$(CYCLIC_DEP)' $@
 endif