Permalink
Browse files

Remove .NET 3.5 pseudo-requirement/support.

The .NET 3.5 support really complicated the version numbering scheme; it's
easier to just remove the use of System.Action`2 and use a custom delegate
type instead.  (Using the major version number for framework version means
that the NDesk.Options major number is the assembly minor number, and by
convention if only the assembly minor number changes the changes are intended
to be backward compatible, which I do NOT want to gaurantee if the
NDesk.Options major number changes, etc.  Plus, lupus called it stupid.)

	* Makefile.am: Only create lib/ndesk-options/NDesk.Options.dll.
	* README: Remove information about LINQ build & .NET 3.5 info.
	* doc/Makefile.am: Use the right NDesk.Options.dll; Add
	  NDesk.Options.OptionAction`2.xml; Remove System.* types.
	* doc/en/examples/subclass.cs: Option.ValueCount -> Option.MaxValueCount.
	* doc/en/NDesk.Options/Option.xml, doc/en/NDesk.Options/OptionContext.xml,
	  doc/en/NDesk.Options/OptionException.xml,
	  doc/en/NDesk.Options/OptionSet.xml,
	  doc/en/NDesk.Options/OptionValueType.xml, doc/en/index.xml: Flush;
	  fix version numbers, fix <see cref="..." /> links, etc.
	* doc/en/System/Action`2.xml, doc/en/ns-System.xml: Remove.
	* lib/pkgconfig/.gitignore: Remove no-longer-generated files.
	* lib/pkgconfig/ndesk-options.pc.in: Update.
	* lib/pkgconfig/ndesk-options-linq.pc.in: Remove.
	* src/NDesk.Options/AssemblyInfo.cs.in: Simplify the assembly version number
	  to "@VERSION@.0".  It will now always be tied to the package version.
	* src/NDesk.Options/NDesk.Options/Options.cs: Remove System.Action`2 when
	  LINQ isn't defined; add NDesk.Options.OptionAction`2 as replacement;
	  rename Option.ValueCount to Option.MaxValueCount.
  • Loading branch information...
1 parent 5f22a12 commit d886bc19e720d1c7b7bef63989452ef89b4b1380 @jonpryor jonpryor committed Feb 14, 2008
View
@@ -1,5 +1,8 @@
SUBDIRS = doc
+nobindir=bin
+nolibdir=lib/ndesk-options
+
OPTIONS_SRC = \
$(builddir)/src/NDesk.Options/AssemblyInfo.cs \
$(srcdir)/src/NDesk.Options/NDesk.Options/Options.cs
@@ -10,38 +13,28 @@ EXTRA_DIST = \
$(srcdir)/ndesk-options.spec.in
assemblydir=$(prefix)/lib/ndesk-options
-assembly_DATA = src/NDesk.Options/NDesk.Options/Options.cs
-
-net2dir=$(assemblydir)/net2
-net2_DATA = $(nolibdir)/net2/NDesk.Options.dll
-net35dir=$(assemblydir)/net3.5
-net35_DATA=$(nolibdir)/net3.5/NDesk.Options.dll
+assembly_DATA = \
+ $(nolibdir)/NDesk.Options.dll \
+ $(srcdir)/src/NDesk.Options/NDesk.Options/Options.cs
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = lib/pkgconfig/ndesk-options.pc lib/pkgconfig/ndesk-options-linq.pc
-
-nobindir=bin
-nolibdir=lib/ndesk-options
+pkgconfig_DATA = lib/pkgconfig/ndesk-options.pc
CSC = $(MCS)
.PHONY: all check rpm
-all: $(nolibdir)/net2/NDesk.Options.dll $(nolibdir)/net3.5/NDesk.Options.dll
+all: $(nolibdir)/NDesk.Options.dll
dist-hook:
if [ -d $(srcdir)/.git ] ; then \
(cd $(srcdir) && git-log > $(distdir)/ChangeLog) ; \
fi
-$(nolibdir)/net2/NDesk.Options.dll: $(OPTIONS_SRC)
+$(nolibdir)/NDesk.Options.dll: $(OPTIONS_SRC)
-mkdir -p `dirname $@`
$(CSC) -debug+ $(OPTIONS_SRC) -t:library -out:$@
-$(nolibdir)/net3.5/NDesk.Options.dll: $(OPTIONS_SRC)
- -mkdir -p `dirname $@`
- $(CSC) -debug+ -d:LINQ -r:System.Core.dll $(OPTIONS_SRC) -t:library -out:$@
-
$(nobindir)/options-test.exe: $(OPTIONS_SRC)
-mkdir -p `dirname $@`
$(CSC) -debug+ -d:TEST $(OPTIONS_SRC) -t:exe -out:$@
@@ -77,8 +70,6 @@ CLEANFILES = \
$(nobindir)/options-test.exe.mdb \
$(nobindir)/options-test-linq.exe \
$(nobindir)/options-test-linq.exe.mdb \
- $(nolibdir)/net2/NDesk.Options.dll \
- $(nolibdir)/net2/NDesk.Options.dll.mdb \
- $(nolibdir)/net3.5/NDesk.Options.dll \
- $(nolibdir)/net3.5/NDesk.Options.dll.mdb
+ $(nolibdir)/NDesk.Options.dll \
+ $(nolibdir)/NDesk.Options.dll.mdb
View
@@ -35,50 +35,21 @@ However, C# 3.0 features are not required, and can be used with C# 2.0:
.Add ("n|name=", delegate (string v) { names.Add (v); });
-Variants:
---------
-
-In order to cut down on the number of unique types (and the combinatorial
-explosion that produces when trying to mix-and-match delegate types),
-NDesk.Options "uses" some .NET 3.5 types.
-
-Normally, this would prevent .NET 2.0 support.
-
-So to support both .NET 2.0 and .NET 3.5, NDesk.Options can be built in two
-separate ways:
-
- - With LINQ `#define`d: .NET 3.5 is assumed.
- - With LINQ `#undef`ined: .NET 2.0 is assumed.
-
-When LINQ is not defined, the System.Action<T1,T2> type is present within
-NDesk.Options.dll. Consequently, to prevent ambiguous type conversions, you
-should only use the LINQ version on .NET 3.5, and the non-LINQ version on
-.NET 2.0.
-
-
Distribution:
------------
In accordance with the Guidelines for Application Deployment [0], there are
pkg-config files to permit simple access to the source or pre-compiled
assemblies for re-use.
-There are three ways to use NDesk.Options:
+There are two ways to use NDesk.Options:
- Bundle src/NDesk.Options/NDesk.Options/Options.cs with your app.
- You should #define LINQ as appropriate, depending on whether you
- target .NET 2.0 or .NET 3.5 (as described above). Source is readily
- obtained via:
pkg-config --variable=Sources ndesk-options
- - Use the .NET 2.0-specific NDesk.Options.dll:
+ - Use a prebuilt NDesk.Options.dll:
pkg-config --variable=Libraries ndesk-options
- - Use the .NET 3.5-specific NDesk.Options.dll:
-
- pkg-config --variable=Libraries ndesk-options-linq
-
-
[0] http://www.mono-project.com/Guidelines:Application_Deployment#Libraries_with_Unstable_APIs
View
@@ -9,17 +9,15 @@ endif
monodocdir=$(SOURCESDIR)
monodoc_DATA=$(TARGETS)
-ASSEMBLIES = \
- net2/NDesk.Options.dll \
- net3.5/NDesk.Options.dll
+ASSEMBLIES = NDesk.Options.dll
UPDATER = $(MONODOCER) -overrides -pretty -path:en
.PHONY: assemble clean edit html update update-delete
assemble: ndesk-options-docs.zip ndesk-options-docs.tree
-$(srcdir)/en/examples/NDesk.Options.dll: $(srcdir)/../lib/ndesk-options/net3.5/NDesk.Options.dll
+$(srcdir)/en/examples/NDesk.Options.dll: $(srcdir)/../lib/ndesk-options/NDesk.Options.dll
cp $^ $@
-cp $^.mdb $@.mdb
@@ -34,14 +32,13 @@ $(srcdir)/en/examples/localization.exe: $(srcdir)/en/examples/locale/es/LC_MESSA
DOCUMENTATION = \
$(srcdir)/en/index.xml \
$(srcdir)/en/ns-NDesk.Options.xml \
- $(srcdir)/en/ns-System.xml \
$(srcdir)/en/NDesk.Options/Option.xml \
+ $(srcdir)/en/NDesk.Options/OptionAction`2.xml \
$(srcdir)/en/NDesk.Options/OptionContext.xml \
$(srcdir)/en/NDesk.Options/OptionException.xml \
$(srcdir)/en/NDesk.Options/OptionSet.xml \
$(srcdir)/en/NDesk.Options/OptionValueCollection.xml \
- $(srcdir)/en/NDesk.Options/OptionValueType.xml \
- $(srcdir)/en/System/Action`2.xml
+ $(srcdir)/en/NDesk.Options/OptionValueType.xml
EXAMPLES_OUTPUT = \
$(srcdir)/en/examples/bundling.txt \
@@ -96,7 +93,7 @@ EXTRA_DIST = \
CLEANFILES = \
ndesk-options-docs.zip \
ndesk-options-docs.tree \
- en/examples/NDesk.Options.dll \
+ en/examples/NDesk.Options.dll* \
en/examples/*.exe \
$(EXAMPLES_OUTPUT)
Oops, something went wrong.

0 comments on commit d886bc1

Please sign in to comment.