I was getting a little frustrated with my linux build breaking because the 'list.unix' files were always out of date, so I set about adding support in library.make for nant-like include/exclude directives.
Here's what I came up with, let me know if I'm smoking crack or not... Piers. <<patch.txt>>
Index: library.make =================================================================== RCS file: /mono/mcs/class/library.make,v retrieving revision 1.7 diff -r1.7 library.make 5a6,9 > SOURCES_CMD=find . \ > \( -false $(SOURCES_INCLUDE:%=-o -path '%') \) -a \ > ! \( -false $(SOURCES_EXCLUDE:%=-o -path '%') \) > 9,12c13 < -rm -rf $(LIBRARY) .response .makefrag library-deps.stamp < < .response: $(LIB_LIST) < cat $^ |egrep '\.cs$$' >$@ --- > -rm -rf $(LIBRARY) .response .makefrag 14,19c15,19 < .makefrag: $(LIB_LIST) $(topdir)/class/library.make < echo -n "library-deps.stamp: " >[email protected] < cat $^ |egrep '\.cs$$' | sed -e 's,\.cs,.cs \\,' >>[email protected] < cat [email protected] |sed -e '$$s, \\$$,,' >$@ < echo -e "\ttouch library-deps.stamp" >>$@ < rm -rf [email protected] --- > .PHONY: .makefrag > .makefrag: > echo -n "SOURCES=" >$@ > $(SOURCES_CMD) | tee .response | sed -e 's/$$/ \\/' >>$@ > # $(SOURCES_CMD) | sed -e 's/$$/ \\/' | tee -a $@ > .response 23c23 < $(LIBRARY): .response library-deps.stamp --- > $(LIBRARY): $(SOURCES) $(topdir)/class/library.make Index: makefile.gnu =================================================================== RCS file: /mono/mcs/class/makefile.gnu,v retrieving revision 1.8 diff -r1.8 makefile.gnu 9d8 < System.EnterpriseServices \ 11a11 > System.EnterpriseServices \ Index: System/makefile.gnu =================================================================== RCS file: /mono/mcs/class/System/makefile.gnu,v retrieving revision 1.4 diff -r1.4 makefile.gnu 5,6c5,16 < LIB_LIST = list.unix < LIB_FLAGS = -r corlib -r System.Xml --- > LIB_FLAGS = -r corlib -r System.Xml -r mscorlib -r System.Xml > #-r System.Drawing > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* \ > ./System.CodeDom/Code-X-Collection.cs \ > ./System.Net/IAuthenticationModule.cs \ > ./System.Net/AuthenticationManager.cs \ > ./System.Diagnostics/Performance*.cs \ > ./System.Diagnostics/Counter*.cs \ > ./System.Diagnostics/InstanceData*.cs Index: System.Data/makefile.gnu =================================================================== RCS file: /mono/mcs/class/System.Data/makefile.gnu,v retrieving revision 1.1 diff -r1.1 makefile.gnu 5d4 < LIB_LIST = list 6a6,11 > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* \ > *TestGDA.cs \ > ./System.Xml* Index: System.Drawing/makefile.gnu =================================================================== RCS file: /mono/mcs/class/System.Drawing/makefile.gnu,v retrieving revision 1.4 diff -r1.4 makefile.gnu 5d4 < LIB_LIST = list.unix 6a6,9 > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* Index: System.Web/makefile.gnu =================================================================== RCS file: /mono/mcs/class/System.Web/makefile.gnu,v retrieving revision 1.1 diff -r1.1 makefile.gnu 5d4 < LIB_LIST = list 6a6,10 > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* > Index: System.XML/makefile.gnu =================================================================== RCS file: /mono/mcs/class/System.XML/makefile.gnu,v retrieving revision 1.4 diff -r1.4 makefile.gnu 5d4 < LIB_LIST = list.unix 6a6,11 > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* \ > ./System.Xml/Driver.cs > Index: corlib/makefile.gnu =================================================================== RCS file: /mono/mcs/class/corlib/makefile.gnu,v retrieving revision 1.3 diff -r1.3 makefile.gnu 5d4 < LIB_LIST = unix.args 6a6,12 > > SOURCES_INCLUDE=*.cs > SOURCES_EXCLUDE=\ > ./Test* \ > ./System.Security.Permissions/SecurityPermissionAttribute.cs \ > ./System.PAL/*.cs \ > ./Windows/*.cs
