From f0fb4e6f58fec507ac0c196a800ee7cd7b1caafa Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Mon, 12 Jan 2015 17:39:10 +0100 Subject: [PATCH] ADC: Make compile_constraints.pl work with base/create_project.pl --- ADC/compile_constraints.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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"); -- 2.43.0