From: Andreas Neiser Date: Mon, 12 Jan 2015 16:39:10 +0000 (+0100) Subject: ADC: Make compile_constraints.pl work with base/create_project.pl X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=f0fb4e6f58fec507ac0c196a800ee7cd7b1caafa;p=trb3.git ADC: Make compile_constraints.pl work with base/create_project.pl --- diff --git a/ADC/compile_constraints.pl b/ADC/compile_constraints.pl index 5644d4b..287f00a 100755 --- a/ADC/compile_constraints.pl +++ b/ADC/compile_constraints.pl @@ -3,7 +3,13 @@ use Data::Dumper; use warnings; use strict; +my $workdir = shift @ARGV || 'workdir'; +unless(-d $workdir) { + print "Creating workdir $workdir\n"; + mkdir $workdir or die "cant create $workdir: $!"; +} + my $TOPNAME = "trb3_periph_adc"; #Name of top-level entity -system("cp ../base/$TOPNAME.lpf workdir/$TOPNAME.lpf"); -system("cat ".$TOPNAME."_constraints.lpf >> workdir/$TOPNAME.lpf"); +system("cp ../base/$TOPNAME.lpf $workdir/$TOPNAME.lpf"); +system("cat ".$TOPNAME."_constraints.lpf >> $workdir/$TOPNAME.lpf");