--- libical/src/libical/Makefile.am.orig	Mon Dec 10 21:45:14 2001
+++ libical/src/libical/Makefile.am	Tue Apr  2 09:10:41 2002
@@ -143,7 +143,8 @@
 	$(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h 
 
 icalderivedparameter.c: $(PARAMETERDEPS) icalparameter.h
-	$(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c
+	cp $(srcdir)/icalderivedparameter.c.in $(srcdir)/icalderivedparameter.c && \
+	$(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -c $(DESIGNDATA)/parameters.csv > icalderivedparameter_gen.c
 
 
 # properties
@@ -162,9 +163,10 @@
 		${DESIGNDATA}/value-types.csv > icalderivedproperty.h 
 
 icalderivedproperty.c: $(PROPERTYDEPS) icalproperty.h 
-	$(PERL)  -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
-		-i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \
-		${DESIGNDATA}/value-types.csv > icalderivedproperty.c
+	cp $(srcdir)/icalderivedproperty.c.in $(srcdir)/icalderivedproperty.c && \
+	$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
+		-c $(DESIGNDATA)/properties.csv \
+		${DESIGNDATA}/value-types.csv > icalderivedproperty_gen.c
 
 # restrictions
 
@@ -190,8 +192,9 @@
 	         -i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h
 
 icalderivedvalue.c: $(VALUEDEPS) icalderivedvalue.h
-	$(PERL)  -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
-		-i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c
+	cp $(srcdir)/icalderivedvalue.c.in $(srcdir)/icalderivedvalue.c && \
+	$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
+		-c $(DESIGNDATA)/value-types.csv > icalderivedvalue_gen.c
 
 # housekeeping
 CONFIG_CLEAN_FILES = y.output
--- libical/src/libical/icalderivedparameter.c.in.orig	Wed Apr 11 15:37:32 2001
+++ libical/src/libical/icalderivedparameter.c.in	Tue Apr  2 09:10:41 2002
@@ -55,8 +55,23 @@
     
 };
 
-extern  struct icalparameter_kind_map parameter_map[];
+/* This map associates the enumerations for the VALUE parameter with
+   the kinds of VALUEs. */
+
+struct icalparameter_value_kind_map {
+    icalparameter_value value; 
+    icalvalue_kind kind; 
+};
+
+/* This map associates the parameter enumerations with a specific parameter and the string representation of the enumeration */
+
+struct icalparameter_map {
+    icalparameter_kind kind;
+    int enumeration;
+    const char* str;
+};
 
+#include <icalderivedparameter_gen.c>
 
 const char* icalparameter_kind_to_string(icalparameter_kind kind)
 {
@@ -94,16 +109,6 @@
     return ICAL_NO_PARAMETER;
 }
 
-/* This map associates the enumerations for the VALUE parameter with
-   the kinds of VALUEs. */
-
-struct icalparameter_value_kind_map {
-    icalparameter_value value; 
-    icalvalue_kind kind; 
-};
-
-extern struct icalparameter_value_kind_map value_kind_map[];
-
 
 icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value)
 {
@@ -119,14 +124,6 @@
     return ICAL_NO_VALUE;
 }
 
-
-/* This map associates the parameter enumerations with a specific parameter and the string representation of the enumeration */
-
-struct icalparameter_map {
-    icalparameter_kind kind;
-    int enumeration;
-    const char* str;
-};
 
 
 extern struct icalparameter_map icalparameter_map[];
--- libical/src/libical/icalderivedproperty.c.in.orig	Wed Apr 11 15:37:32 2001
+++ libical/src/libical/icalderivedproperty.c.in	Tue Apr  2 09:10:41 2002
@@ -59,7 +59,17 @@
 
 };
 
-extern struct icalproperty_map property_map[];
+/* This map associates the property enumerations with the king of
+   property that they are used in and the string representation of the
+   enumeration */
+
+struct icalproperty_enum_map {
+    icalproperty_kind prop;
+    int prop_enum;
+    const char* str;
+}; 
+
+#include "icalderivedproperty_gen.c"
 
 const char* icalproperty_kind_to_string(icalproperty_kind kind)
 {
@@ -127,19 +137,6 @@
 
     return ICAL_NO_VALUE;
 }
-
-
-/* This map associates the property enumerations with the king of
-   property that they are used in and the string representation of the
-   enumeration */
-
-struct icalproperty_enum_map {
-    icalproperty_kind prop;
-    int prop_enum;
-    const char* str;
-}; 
-
-extern struct icalproperty_enum_map enum_map[];
 
 
 const char* icalproperty_enum_to_string(int e)
--- libical/src/libical/icalderivedvalue.c.in.orig	Wed Apr 11 15:37:32 2001
+++ libical/src/libical/icalderivedvalue.c.in	Tue Apr  2 09:10:41 2002
@@ -60,7 +60,7 @@
 	char name[20];
 };
 
-extern struct icalvalue_kind_map value_map[]; 
+#include "icalderivedvalue_gen.c"
 
 const char* icalvalue_kind_to_string(icalvalue_kind kind)
 {
