#!/usr/bin/perl use strict; use XML::Simple; use Data::Dumper; my $input = ".distfiles"; my $output = "distfiles.mk"; open( my $fh => $input) || die "Cannot open $input: $!"; open( my $oh, ">", $output) || die "Cannot open $output: $!"; print $oh "# This File is automatically generated by make dist-update\n"; print $oh "# Any Edits on this file will be lost next time dist-update is run\n"; print $oh "\n"; print $oh "DISTFILES =\t"; while(my $line = <$fh>) { chomp($line); print $oh $line." \\\n\t"; } print $oh "cpp/src/vers.cpp\n"; close($oh); close($fh);