Skip to content
Snippets Groups Projects
Commit 5a812993 authored by Hernán Asorey's avatar Hernán Asorey
Browse files

Minor change in Makefile: now check and requires LAGO_DAQ. If LAGO_DAQ is not...

Minor change in Makefile: now check and requires LAGO_DAQ. If LAGO_DAQ is not defined, ask to run lago-configs.pl. So, lago-configs.pl don't require lago to be compiled, and version is included in metadata at lago runtime
parent 3e10f5f5
No related branches found
Tags acqua-v1r0
No related merge requests found
...@@ -12,7 +12,13 @@ clean: check-lago ...@@ -12,7 +12,13 @@ clean: check-lago
rm lago rm lago
check-lago: check-lago:
ifndef LAGO_DAQ ifndef LAGO_DAQ
$(warning LAGO_DAQ is not set. Using $(PWD)) $(info LAGO_DAQ is not set.)
LAGO_DAQ=$(PWD) $(info Please run lago-configs.pl before to compile)
$(warning LAGO_DAQ was set to $(LAGO_DAQ)) $(error )
endif
ifneq ($(LAGO_DAQ), $(PWD))
$(info LAGO_DAQ is defined, but you are not in the directory pointed by LAGO_DAQ.)
$(info LAGO_DAQ=$(LAGO_DAQ))
$(info current dir=$(PWD))
$(error )
endif endif
...@@ -51,14 +51,6 @@ ...@@ -51,14 +51,6 @@
# */ # */
# /************************************************************************/ # /************************************************************************/
# verify LAGO DAQ is compiled
unless (-e "lago") {
print "\n# ERROR\t\tBefore to start, you have to compile the suite. Please read INSTALL.md\n";
exit 1;
}
$daq_version=`./lago -v`;
chomp($daq_version);
# Metadata containers # Metadata containers
%configs=(); %configs=();
@parameters=(); @parameters=();
...@@ -532,7 +524,6 @@ ask(168,193,$block,$blockN); ...@@ -532,7 +524,6 @@ ask(168,193,$block,$blockN);
$now=time; $now=time;
print $fh "work=\"$configs{$parameters[0]}\"\n"; print $fh "work=\"$configs{$parameters[0]}\"\n";
print $fh "user=\"$ENV{'USER'}\"\n"; print $fh "user=\"$ENV{'USER'}\"\n";
print $fh "version=\"$daq_version\"\n";
print $fh "configTime=$now\n"; print $fh "configTime=$now\n";
print "# SUCCESS\tDone. Writing the new lago-configs file\n"; print "# SUCCESS\tDone. Writing the new lago-configs file\n";
cmd("mv lago-configs-tmp lago-configs"); cmd("mv lago-configs-tmp lago-configs");
......
...@@ -556,6 +556,7 @@ int NewFile() { ...@@ -556,6 +556,7 @@ int NewFile() {
fprintf(fhmtd, "dataVersion=%d\n",DATAVERSION); fprintf(fhmtd, "dataVersion=%d\n",DATAVERSION);
for (unsigned int i=0; i<configs_lines.size(); i++) for (unsigned int i=0; i<configs_lines.size(); i++)
fprintf(fhmtd, "%s\n", configs_lines[i].c_str()); fprintf(fhmtd, "%s\n", configs_lines[i].c_str());
fprintf(fhmtd, "version=\"LAGO ACQUA BRC v%dr%d data v%d\"\n",VERSION,REVISION,DATAVERSION);
fflush(fhout); fflush(fhout);
fflush(fhmtd); fflush(fhmtd);
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment