aboutsummaryrefslogtreecommitdiffstats
path: root/libical/scripts/mkderivedcomponents.pl
diff options
context:
space:
mode:
Diffstat (limited to 'libical/scripts/mkderivedcomponents.pl')
-rwxr-xr-xlibical/scripts/mkderivedcomponents.pl35
1 files changed, 31 insertions, 4 deletions
diff --git a/libical/scripts/mkderivedcomponents.pl b/libical/scripts/mkderivedcomponents.pl
index 3599a8d465..ac4e472250 100755
--- a/libical/scripts/mkderivedcomponents.pl
+++ b/libical/scripts/mkderivedcomponents.pl
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use Getopt::Std;
-getopts('chsp');
+getopts('chspi:');
# ARG 0 is components.txt
@@ -11,6 +11,8 @@ my @components;
while (<PV>){
+ s/#.*//;
+
chop;
push(@components,$_);
@@ -19,7 +21,32 @@ while (<PV>){
close PV;
-if ($opt_c or $opt_h){
+# Write the file inline by copying everything before a demarcation
+# line, and putting the generated data after the demarcation
+
+if ($opt_i) {
+
+ open(IN,$opt_i) || die "Can't open input file \"$opt_i\"";
+
+ while(<IN>){
+
+ if (/Do not edit/){
+ last;
+ }
+
+ print;
+
+ }
+
+ if($opt_i){
+ print "# Everything below this line is machine generated. Do not edit. \n";
+ } else {
+ print "/* Everything below this line is machine generated. Do not edit. */\n";
+ }
+
+}
+
+if ($opt_c or $opt_h and !$opt_i){
print <<EOM;
/* -*- Mode: C -*-
@@ -55,7 +82,7 @@ EOM
}
-if ($opt_p){
+if ($opt_p and !$opt_i){
print <<EOM;
@@ -127,7 +154,7 @@ sub new
my \$self = Net::ICal::Component::new_from_ref(\$c);
Net::ICal::Component::_add_elements(\$self,\\\@_);
- bless \$self, \$package;
+ # Self is blessed in new_from_ref
return \$self;
-gnome/commit/x11-fm/krusader2?h=gstreamer&id=c8007265d81e778bec43e1f7b073b196887b3604'>Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-2/+0 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * - Update to 1.9.0beech2008-04-243-6/+21 * Remove always-false/true conditions based on OSVERSION 500000edwin2007-10-041-7/+1 * Update to 1.80.0arved2007-07-304-22/+65 * - Fix build with gcc 4.2miwi2007-06-052-1/+14 * - Welcome X.org 7.2 \o/.flz2007-05-202-20/+1 * - Remove QTDIR from CONFIGURE_ENV, it's in there already thanks to frameworkpav2007-02-131-1/+1 * - Mark broken on 4.xmiwi2006-11-191-2/+8 * - Update 1.70.1rafan2006-07-193-4/+5 * - Update to version 1.70.0markus2006-04-036-139/+167 * Conversion to a single libtool environment.ade2006-02-232-2/+4 * SHA256ifyedwin2006-01-241-0/+1