ID |
Date |
Author |
Topic |
Subject |
468
|
11 Mar 2008 |
Stefan Ritt | Suggestion | "Makefile-by-EL" updated |
The linking of mhttpd misses a "-lm":
cc -g -O3 -Wall -Wuninitialized -DINCLUDE_FTPLIB -D_LARGEFILE64_SOURCE -DOS_LINUX
-fPIC -Wno-unused-function -DHAVE_ZLIB -Iinclude -Idrivers -I../mxml -o
linux/bin/mhttpd linux/lib/mhttpd.o linux/lib/mgd.o linux/lib/libmidas.a -lutil
-lpthread -lz
linux/lib/mhttpd.o(.text+0xe08f): In function `show_custom_gif':
src/mhttpd.c:5058: undefined reference to `log'
linux/lib/mhttpd.o(.text+0xe0a8):src/mhttpd.c:5058: undefined reference to `log'
The header of the makefile should contain a short description, the author(s), an
$Id:$ tag for SVN, some explanation what "icc", "ifort" means, a note about the
CFLAGS and a clear statement what can be modified by the user and why and what not. |
469
|
11 Mar 2008 |
Exaos Lee | Suggestion | "Makefile-by-EL" updated |
> The linking of mhttpd misses a "-lm":
>
> cc -g -O3 -Wall -Wuninitialized -DINCLUDE_FTPLIB -D_LARGEFILE64_SOURCE -DOS_LINUX
> -fPIC -Wno-unused-function -DHAVE_ZLIB -Iinclude -Idrivers -I../mxml -o
> linux/bin/mhttpd linux/lib/mhttpd.o linux/lib/mgd.o linux/lib/libmidas.a -lutil
> -lpthread -lz
> linux/lib/mhttpd.o(.text+0xe08f): In function `show_custom_gif':
> src/mhttpd.c:5058: undefined reference to `log'
> linux/lib/mhttpd.o(.text+0xe0a8):src/mhttpd.c:5058: undefined reference to `log'
>
Strange. I tested it on Debian Linux 4.0r2 AMD64 with gcc 4.1.2, MIDAS SVN 4124. It worked fine.
Anyway, it can be fixed by addling "-lm" to the initial"LDFLAGS".
> The header of the makefile should contain a short description, the author(s), an
> $Id:$ tag for SVN, some explanation what "icc", "ifort" means, a note about the
> CFLAGS and a clear statement what can be modified by the user and why and what not.
OK. I will comment it in detail. |
470
|
12 Mar 2008 |
Konstantin Olchanski | Suggestion | New Makefile for building MIDAS |
> > Most experience with autoconf/automake is all negative. The promise was "never debug your Makefile ever
> > again!", delivered was "debug the configure script instead!".
>
> I admit that the new one is fit to my flavor. For a common user, I think, a simple procedure of configure/make/install
> is better than changing the Makefile manually because many users are lack of knowledges about Makefile. That's why
> I want to learn autotools.
The reality is that you will never deliver a Makefile/Configure script that works for everybody in every case - users will always have a need to tweak the build
process to suit their needs. In this situation, "Makefile" is a much better language and "make" is a much better tool for users to deal with - much simpler, better
documented and better understood compared to autotools (*nobody* understands autotools; also compare the size of the midas Makefile with the size of a
typical configure script).
Anyhow, we will be cross-compiling midas to run on a PowerPC processor inside a Virtex4 FPGA. Go handle that with configure scripts.
K.O. |
487
|
11 Jun 2008 |
Andreas Suter | Suggestion | mlogger is flooding the message queue |
The current versions of mlogger SVN 4215 is flooding our message system with
stuff like
> Tue Jun 10 16:42:01 2008 [Logger,INFO] Configured history with 22 events
> Tue Jun 10 16:42:14 2008 [Logger,INFO] Configured history with 22 events
> Tue Jun 10 16:42:26 2008 [Logger,INFO] Configured history with 22 events
This is fatal to us and blowing up the midas.log like hell. I would prefer if
one could flag these kind of messages (ODB /Logger/..), i.e. enable and disable
it. At the moment I have to comment it out in the source code since we cannot
work with it.
Cheers,
Andreas |
488
|
11 Jun 2008 |
Konstantin Olchanski | Suggestion | mlogger is flooding the message queue |
> The current versions of mlogger SVN 4215 is flooding our message system with
> stuff like
>
> > Tue Jun 10 16:42:01 2008 [Logger,INFO] Configured history with 22 events
> > Tue Jun 10 16:42:14 2008 [Logger,INFO] Configured history with 22 events
> > Tue Jun 10 16:42:26 2008 [Logger,INFO] Configured history with 22 events
>
> This is fatal to us and blowing up the midas.log like hell. I would prefer if
> one could flag these kind of messages (ODB /Logger/..), i.e. enable and disable
> it. At the moment I have to comment it out in the source code since we cannot
> work with it.
I just sent the attached message to Stefan - please read it.
Before we take any action, we need to understand why history is being
reconfigured every 10 seconds (according to your logfile snippet).
Are you starting a new run every 10 seconds?
If that is what you do and that is your intent, I guess it is atypical usage of
MIDAS and the message from the mlogger is offensive and should be removed/disabled.
If something else is going on, we need to understand it before we sweep trouble
under the carpet by disabling this message.
K.O.
Stefan - there is more bad news - the message is produced when the history
is being reconfigured. This only is supposed to happen when the mlogger
starts or at the begin of run.
So these messages are just a tip of an iceberg of some other trouble.
The logic of when history is reconfigured I did not change. So likely
the trouble existed before, but you did not know about it.
We can kill the message, but why is the history being reconfigured
at a rate that "floods the log file"? That cannot possibly be good.
K.O. |
490
|
16 Jun 2008 |
Konstantin Olchanski | Suggestion | mlogger is flooding the message queue |
> The current versions of mlogger SVN 4215 is flooding our message system with
> stuff like
>
> > Tue Jun 10 16:42:01 2008 [Logger,INFO] Configured history with 22 events
> > Tue Jun 10 16:42:14 2008 [Logger,INFO] Configured history with 22 events
> > Tue Jun 10 16:42:26 2008 [Logger,INFO] Configured history with 22 events
Problem confirmed on the M11 DAQ system at TRIUMF. We definitely do nothing funny
there, so what is going on? Will investigate.
K.O. |
491
|
16 Jun 2008 |
Stefan Ritt | Suggestion | mlogger is flooding the message queue |
> > The current versions of mlogger SVN 4215 is flooding our message system with
> > stuff like
> >
> > > Tue Jun 10 16:42:01 2008 [Logger,INFO] Configured history with 22 events
> > > Tue Jun 10 16:42:14 2008 [Logger,INFO] Configured history with 22 events
> > > Tue Jun 10 16:42:26 2008 [Logger,INFO] Configured history with 22 events
>
> Problem confirmed on the M11 DAQ system at TRIUMF. We definitely do nothing funny
> there, so what is going on? Will investigate.
The only place I see where this could happen is in mlogger.c, lines 3064ff:
/* check if event size has changed */
db_get_record_size(hDB, hKey, 0, &size);
if (size != hist_log[i].buffer_size) {
close_history();
open_history();
return;
}
The record size corresponds to /Equipment/<name>/Variables. If this array changes in
size, it will trigger the re-definition of the history. So please have a look there
and check why the record size changes. |
522
|
04 Nov 2008 |
Suzannah Daviel | Suggestion | <odb ... edit=1> buttons and javascript |
When writing custom webpages, it would be nice to be able to write code such as
<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset (ms)" edit=1>
from Javascript, e.g.
<script type="text/javascript">
if ( flag != 3)
document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset
(ms)" edit=1>ms');
else
document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans4/time offset
(ms)" edit=1>ms');
</script>
This is not translated correctly by mhttpd; the final quote and bracket get
stripped off, and it gives Javascript error
Error: unterminated string literal
Source File: http://titan04:8089/CS/ppg_cycle?cmd=Edit&index=11
Line: 477, Column: 18
Source Code:
document.write('<input type=text size=10 maxlength=80 name=value value="1">
I can get round this by using an input box and a combination of ODBGet and
ODBSet, but it would be easier if the edit=1 form above worked correctly, or
there was a command like ODBSet that would accept input from the user.
Thanks.
would be nice is there was a command such as ODBGet or ODBSet that would work
with javascript to |
526
|
09 Nov 2008 |
Stefan Ritt | Suggestion | <odb ... edit=1> buttons and javascript |
> When writing custom webpages, it would be nice to be able to write code such as
>
> <odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset (ms)" edit=1>
>
> from Javascript, e.g.
> <script type="text/javascript">
> if ( flag != 3)
> document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset
> (ms)" edit=1>ms');
> else
> document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans4/time offset
> (ms)" edit=1>ms');
> </script>
>
> This is not translated correctly by mhttpd; the final quote and bracket get
> stripped off, and it gives Javascript error
>
> Error: unterminated string literal
> Source File: http://titan04:8089/CS/ppg_cycle?cmd=Edit&index=11
> Line: 477, Column: 18
> Source Code:
> document.write('<input type=text size=10 maxlength=80 name=value value="1">
>
> I can get round this by using an input box and a combination of ODBGet and
> ODBSet, but it would be easier if the edit=1 form above worked correctly, or
> there was a command like ODBSet that would accept input from the user.
>
> Thanks.
>
> would be nice is there was a command such as ODBGet or ODBSet that would work
> with javascript to
Actually that won't work, even if I would fix it. The <odb> tag is evaluated on the
server side (mhttpd), where is gets replaced by the actual ODB value. But if you
use JavaScript to generate the <odb> tag dynamically, this only happens on the
client side, so the server has no chance to substitute them. So you have to go with
ODBGet's I'm afraid. Nevertheless, I changed the code such that any ODB tags inside
a JavaScript is not interpreted by mhttpd. |
579
|
18 May 2009 |
Exaos Lee | Suggestion | Question about using mvmestd.h |
The "mvmestd.h" uses the following function to open a VME device:int mvme_open(MVME_INTERFACE **vme, int idx) I found that the "driver/vme/sis3100/sis3100.c" uses the implementation as:
/* open VME */
sprintf(str, "/dev/sis1100_%02dremote", idx);
(*vme)->handle = open(str, O_RDWR, 0);
if ((*vme)->handle < 0)
return MVME_NO_INTERFACE;
}
The problem is: I renamed my SIS1100 devices as /dev/sis1100/xxxxx. So I have to hack the "sis3100.c".
Shall we have some smart way? |
580
|
18 May 2009 |
Stefan Ritt | Suggestion | Question about using mvmestd.h |
Exaos Lee wrote: | The "mvmestd.h" uses the following function to open a VME device:int mvme_open(MVME_INTERFACE **vme, int idx) I found that the "driver/vme/sis3100/sis3100.c" uses the implementation as:
/* open VME */
sprintf(str, "/dev/sis1100_%02dremote", idx);
(*vme)->handle = open(str, O_RDWR, 0);
if ((*vme)->handle < 0)
return MVME_NO_INTERFACE;
}
The problem is: I renamed my SIS1100 devices as /dev/sis1100/xxxxx. So I have to hack the "sis3100.c".
Shall we have some smart way? |
In principle one could pass the device name to the user level. But I would like to keep the same code for Windows and Linux, and Windows does not need a device name. So you can either hack the file (I'm pretty sure it won't change in the next few years) or what I do is to make a symbolic link
/dev/sis1100/xxxx -> /dev/sis1100_00remote
Best regards,
Stefan |
581
|
19 May 2009 |
Konstantin Olchanski | Suggestion | Question about using mvmestd.h |
> The problem is: I renamed my SIS1100 devices as /dev/sis1100/xxxxx. So I have to hack the
"sis3100.c".
As in the old joke, "Doctor, it hurts when I do *this*; Doctor answers: then don't do it!"
But I am curious why you want to change the "manufacturer-default" device names. For the vmivme.c and
gefvme.c drivers that we use at TRIUMF, there is no obvious reason or gain from changing device names.
K.O. |
582
|
20 May 2009 |
Exaos Lee | Suggestion | Question about using mvmestd.h |
> > The problem is: I renamed my SIS1100 devices as /dev/sis1100/xxxxx. So I have to hack the
> "sis3100.c".
>
> As in the old joke, "Doctor, it hurts when I do *this*; Doctor answers: then don't do it!"
>
> But I am curious why you want to change the "manufacturer-default" device names. For the vmivme.c and
> gefvme.c drivers that we use at TRIUMF, there is no obvious reason or gain from changing device names.
>
> K.O.
I used the old V2.04 driver for SIS1100/SIS3100. The old package contains a script which creates devices
as /tmp/sis1100_XXXX. So I created another script and installed it into /etc/init.d/. That script can be
invoked by using standard rc.d tools. In order to make the /dev directory tidy, it creates device files
into just one directory as /dev/sis1100/. That's the story.
Now, I found, the new sis1100.ko of version 2.12 can create devices automatically as /dev/sis1100_xxxx.
So, my script can be retired now. And also, I needn't to hack the "sis3100.c" anymore. |
618
|
18 Aug 2009 |
Denis Calvet | Suggestion | Could not create strings other than 32 characters with odbedit -c "..." command |
Hi,
I am writing shell scripts to create some tree structure in an ODB. When
creating an array of strings, the default length of each string element is 32
characters. If odbedit is used interactively to create the array of strings,
the user is prompted to enter a different length if desired. But if the
command odbedit is called from a shell script, I did not succeed in passing
the argument to get a different length.
I tried:
odbedit -c "create STRING Test[8][40]"
Or:
odbedit -c "create STRING Test[8] 40"
Or:
odbedit -c "create STRING Test[8] \n 40"
etc. all produce an array of 8 strings with 32 characters each.
I haven't tried all possible syntaxes, but I suspect the length argument is
dropped. If it has not been fixed in a later release than the one I am using,
could this problem be looked at?
Thanks,
Denis.
|
627
|
03 Sep 2009 |
Stefan Ritt | Suggestion | Could not create strings other than 32 characters with odbedit -c "..." command |
> Hi,
> I am writing shell scripts to create some tree structure in an ODB. When
> creating an array of strings, the default length of each string element is 32
> characters. If odbedit is used interactively to create the array of strings,
> the user is prompted to enter a different length if desired. But if the
> command odbedit is called from a shell script, I did not succeed in passing
> the argument to get a different length.
> I tried:
> odbedit -c "create STRING Test[8][40]"
> Or:
> odbedit -c "create STRING Test[8] 40"
> Or:
> odbedit -c "create STRING Test[8] \n 40"
> etc. all produce an array of 8 strings with 32 characters each.
> I haven't tried all possible syntaxes, but I suspect the length argument is
> dropped. If it has not been fixed in a later release than the one I am using,
> could this problem be looked at?
Ok, I added a command
odbedit -c "create STRING Test[8][40]"
which works now. Please update to SVN revision 4555 of odbedit.c
- Stefan |
629
|
03 Sep 2009 |
Exaos Lee | Suggestion | Building MIDAS using CMake |
I write some configure file to build MIDAS using CMake. The usage is simple:
1. Unzip the attachment, copy "CMakeLists.txt" and directory "cmake" into the
midas source tree.
$ cp -rp CMakeLists.txt cmake/ <PATH-TO-MIDAS>/
2. make a separate directory, such as "build". It's a good habit to build a
project without polluting the source tree. :-)
$ mkdir build
3. Executing cmake
$ cd build && cmake <PATH-TO-MIDAS>
4. Make
$ make
Or, you can generate Xcode project files:
$ cmake -G Xcode <PATH-TO-MIDAS>
or using visual studio
$ cmake -G "Visual Studio" <PATH-TO-MIDAS>
(I havn't Visual Studio and windows, so the above command is not tested.)
or using other IDEs, such as KDevelop3, Eclipse, etc, just type:
$ cmake -G "KDevelop3" <PATH-TO-MIDAS>
or
$ cmake -G "Eclipse CDT4" <PATH-TO-MIDAS>
I test the configure file with GNU make and CMake 2.6.4 on Debian Lenny. I
havn't add installation commands now. Maybe later. If anyone interests in it, I
may check it again. Anyway, I'm using it. |
Attachment 1: cmake.zip
|
630
|
03 Sep 2009 |
Exaos Lee | Suggestion | Some screenshot using CMake with MIDAS |
I didn't add optimization flags to compile, so I got link error while generating mcnaf as I reported before.
The screen-shots show that the configure files works because I have modified the "driver/camac/camacrpc.c". |
Attachment 1: Screenshot-11.png
|
|
Attachment 2: Screenshot-13.png
|
|
634
|
06 Sep 2009 |
Exaos Lee | Suggestion | Could not create strings other than 32 characters with odbedit -c "..." command |
> Ok, I added a command
>
> odbedit -c "create STRING Test[8][40]"
>
> which works now. Please update to SVN revision 4555 of odbedit.c
>
> - Stefan
If I want to create only one string, should I write like this:
odbedit -c "create STRING Test[] [256]"
OK. I need it. I will try the new odbedit. |
638
|
06 Sep 2009 |
Exaos Lee | Suggestion | Updated "CMakeLists.txt" |
Add installation commands. Please see the attachment. |
Attachment 1: CMakeLists.txt
|
#-*- mode: cmake -*-
## CMake pre-settings
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.6)
cmake_policy(SET CMP0011 NEW)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
## Project setup
project(MIDAS)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
enable_language(C)
enable_language(CXX)
## Include utilities and options
# Find mxml
include(FindMXML)
include_directories(include ${MXML_PATH})
# OS specific flags
# OS-related CMake variables:
# 1. OS_EXTRA_UTILS --- Extra utilities for specific OS
# 2. OS_EXTRA_LDFLAGS --- Extra link flags for specific OS
# 3. OS_EXTRA_DEFS --- Extra definitions for specific OS
# 4. Other flags switched on for specific OS
include(OSflags)
include(FindROOT) # Find ROOT environment
include(FindMySQL) # Find MySQL
include(FindODBC) # Find ODBC
include(FindZLIB) # Find zlib
## Options for MIDAS
set(NEED_CERNLIB TRUE) # Need CERNLIB or not?
set(NEED_SHLIB TRUE) # Need shared library?
set(NEED_ROOT TRUE) # Need root?
set(NEED_FTPLIB TRUE) # Need ftp protocol?
#set(NEED_STRLCPY TRUE) # Need strlcpy.h? -- maybe opened in OSflags.cmake
#set(MIDAS_MAX_EVENT_SIZE 1000000) # maxmimum event size = ?
##############################################################################
## Setup options
## OS-specific
add_definitions(${OS_EXTRA_DEFS})
set(LDFLAGS "${LDFLAGS} ${OS_EXTRA_LDFLAGS}")
set(EXTRA_UTILS ${EXTRA_UTILS} ${OS_EXTRA_UTILS})
## Midas max event size
if(MIDAS_MAX_EVENT_SIZE)
add_definitions(-DMAX_EVENT_SIZE=${MIDAS_MAX_EVENT_SIZE})
endif(MIDAS_MAX_EVENT_SIZE)
## strlcpy in "MXML"?
if(NEED_STRLCPY)
set(EXTRA_OBJS ${EXTRA_OBJS} strlcpy)
add_definitions( -DHAVE_STRLCPY )
message(STATUS "Using Stephen's own strlcpy()")
endif(NEED_STRLCPY)
## FTPLIB needed?
if(NEED_FTPLIB)
set(FTPLIB ftplib)
add_definitions(-DINCLUDE_FTPLIB)
message(STATUS "Using ftplib (FTP library)")
endif(NEED_FTPLIB)
## ODBC: -lodbc or -liodbc
if(ODBC_FOUND)
message(STATUS "Add ODBC-specified targets using ${ODBC_LIBRARY}")
set(EXTRA_UTILS ${EXTRA_UTILS} mh2sql)
add_definitions(-DHAVE_ODBC)
set(LDFLAGS "${LDFLAGS} -l${ODBC_NAME}")
else(ODBC_FOUND)
message(STATUS "ODBC not found!")
endif(ODBC_FOUND)
## ZLIB
if(ZLIB_FOUND)
add_definitions(-DHAVE_ZLIB)
set(LDFLAGS "${LDFLAGS} -lz")
endif(ZLIB_FOUND)
## ROOT
if(NEED_ROOT AND ROOT_FOUND)
message(STATUS "Using ROOT at ${ROOTSYS}")
if(NEED_RPATH) # Add rpath ..
set(ROOT_LIBS "${ROOT_LIBS} -Wl,-rpath,${ROOTSYS}/lib")
endif(NEED_RPATH)
## libRoot.a: Static ROOT library
if(NEED_LIBROOTA AND ROOT_LIBA)
set(LDFLAGS "${LDFLAGS} ${ROOTSYS}/lib/libRoot.a -lssl -ldl -lcrypt")
message(STATUS "Using statlic ROOT library: ${ROOT_LIBA}")
endif(NEED_LIBROOTA AND ROOT_LIBA)
endif(NEED_ROOT AND ROOT_FOUND)
####### MIDAS library and objects #########################
## Objects needed to build the libmidas(.a,.so,..)
foreach(obj ${FTPLIB} midas system mrpc odb ybos history alarm elog)
set(LIB_OBJS ${LIB_OBJS} src/${obj}.c)
endforeach(obj)
foreach(obj mxml ${EXTRA_OBJS})
set(LIB_OBJS ${LIB_OBJS} ${MXML_PATH}/${obj}.c)
endforeach(obj)
if(ODBC_FOUND)
set(LIB_OBJS ${LIB_OBJS} src/history_odbc.cxx)
endif(ODBC_FOUND)
## Library definition
## Add static lib
add_library(midas-static STATIC ${LIB_OBJS})
set_target_properties(midas-static PROPERTIES OUTPUT_NAME "midas")
if(NEED_SHLIB) # Add shared lib
add_library(midas-shared SHARED ${LIB_OBJS})
set_target_properties(midas-shared PROPERTIES OUTPUT_NAME "midas")
endif(NEED_SHLIB)
########## Utilities ######################################
## Core Utilties
set(CORE_UTILS mserver mhttpd mlogger odbedit lazylogger)
add_executable(mserver src/mserver.c)
add_executable(mlogger src/mlogger.c)
add_executable(mhttpd src/mhttpd.c src/mgd.c )
add_executable(odbedit src/odbedit.c src/cmdedit.c )
add_executable(lazylogger src/lazylogger.c)
foreach(exe ${CORE_UTILS})
target_link_libraries(${exe} midas-static)
set_target_properties(${exe} PROPERTIES LINK_FLAGS "${LDFLAGS}")
endforeach(exe)
set_target_properties( mhttpd PROPERTIES
LINK_FLAGS "-lm ${LDFLAGS}" LINKER_LANGUAGE CXX )
## for mlogger --- It's BAD to name a CXX source using ".c" file extension !!!
set_target_properties( mlogger
PROPERTIES
LINK_FLAGS "${MYSQL_LIBS} ${ROOT_LIBS} ${LDFLAGS}"
LINKER_LANGUAGE CXX
COMPILE_FLAGS "${ROOT_CFLAGS}" )
set_source_files_properties( src/mlogger.c PROPERTIES LANGUAGE CXX )
## Utilities
set(UTILS mtape mhist mstat mdump mchart
webpaw odbhist melog mcnaf
mhdump mtransition # C++ codes
${EXTRA_UTILS} )
foreach(exe mtape mhist mstat mdump melog mchart odbhist webpaw)
add_executable(${exe} utils/${exe}.c)
endforeach(exe)
add_executable(mhdump utils/mhdump.cxx)
add_executable(mcnaf utils/mcnaf.c drivers/camac/camacrpc.c)
add_executable(mtransition src/mtransition.cxx)
# optional utilities
if("${UTILS}" MATCHES "mh2sql")
add_executable(mh2sql utils/mh2sql.cxx src/history_odbc.cxx )
endif("${UTILS}" MATCHES "mh2sql")
if("${UTILS}" MATCHES "mlxspeaker")
add_executable(mlxspeaker utils/mlxspeaker.c)
endif("${UTILS}" MATCHES "mlxspeaker")
if("${UTILS}" MATCHES "dio")
add_executable(dio utils/dio.c)
endif("${UTILS}" MATCHES "dio")
foreach(exe ${UTILS})
add_dependencies(${exe} midas-static)
target_link_libraries(${exe} midas-static)
set_target_properties(${exe} PROPERTIES LINK_FLAGS "${LDFLAGS}")
endforeach(exe)
## Scripts
set(SCRIPTS stripchart.tcl ) # TCL script
## Special targets
## for generating mfe.o
add_custom_command( OUTPUT mfe.o DEPENDS src/mfe.c
COMMAND ${CMAKE_C_COMPILER}
ARGS -I${CMAKE_SOURCE_DIR}/include -c ${CMAKE_SOURCE_DIR}/src/mfe.c
WORKING_DIRECTORY lib )
add_custom_target(mfe ALL DEPENDS mfe.o)
## for generating mfe.o
add_custom_command( OUTPUT fal.o DEPENDS src/fal.c
COMMAND ${CMAKE_C_COMPILER}
ARGS -I${CMAKE_SOURCE_DIR}/include -Dextname -DMANA_LITE
-c ${CMAKE_SOURCE_DIR}/src/fal.c
WORKING_DIRECTORY lib )
add_custom_target(fal ALL DEPENDS fal.o)
## analyzer objects: mana.o
add_custom_command( OUTPUT mana.o DEPENDS src/mana.c
COMMAND ${CMAKE_C_COMPILER}
ARGS -I${CMAKE_SOURCE_DIR}/include -c ${CMAKE_SOURCE_DIR}/src/mana.c
WORKING_DIRECTORY lib )
add_custom_target(mana ALL DEPENDS mana.o)
set(EXTRA_MOBJS mfe.o fal.o mana.o)
# rmana.o
if(NEED_ROOT)
set(ARG_LIST "-DUSE_ROOT ${ROOT_CFLAGS} -I${CMAKE_SOURCE_DIR}/include -o rmana.o -c ${CMAKE_SOURCE_DIR}/src/mana.c")
separate_arguments(ARG_LIST)
add_custom_command( OUTPUT rmana.o DEPENDS src/mana.c
COMMAND ${CMAKE_CXX_COMPILER}
ARGS ${ARG_LIST} WORKING_DIRECTORY lib )
add_custom_target(rmana ALL DEPENDS rmana.o )
set(EXTRA_MOBJS ${EXTRA_MOBJS} rmana.o )
endif(NEED_ROOT)
## hmana.o
if(NEED_CERNLIB)
add_custom_command( OUTPUT hmana.o DEPENDS src/mana.c
COMMAND ${CMAKE_C_COMPILER}
ARGS -I${CMAKE_SOURCE_DIR}/include -Dextname -DHAVE_HBOOK -o hmana.o
-c ${CMAKE_SOURCE_DIR}/src/mana.c
WORKING_DIRECTORY lib )
add_custom_target(hmana ALL DEPENDS hmana.o)
set(EXTRA_MOBJS ${EXTRA_MOBJS} hmana.o )
endif(NEED_CERNLIB)
########## Drivers and modules ################################
#
########## Examples ###########################################
#
########## Installation########################################
#
## Library and objects (custom targets)
install(TARGETS midas-static ARCHIVE DESTINATION lib)
if(NEED_SHLIB)
install(TARGETS midas-shared LIBRARY DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE WORLD_EXECUTE WORLD_READ)
endif(NEED_SHLIB)
foreach(obj ${EXTRA_MOBJS})
install(FILES ${PROJECT_BINARY_DIR}/lib/${obj} DESTINATION lib)
endforeach(obj)
## Core and extra utilities, scripts
install(TARGETS ${CORE_UTILS} ${UTILS}
RUNTIME DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE WORLD_EXECUTE WORLD_READ)
#install ${SCRIPTS}
foreach(script ${SCRIPTS})
install(FILES utils/${script} DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE WORLD_EXECUTE WORLD_READ)
endforeach(script)
## include, src, examples, drivers
# install(DIRECTORY include/ DESTINATION include/midas
# FILES_MATCHING PATTERN "*.h")
# install(DIRECTORY src DESTINATION share/midas)
# install(DIRECTORY examples DESTINATION share/midas)
# install(DIRECTORY drivers DESTINATION share/midas)
install(DIRECTORY include/ DESTINATION include
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY src/ DESTINATION src)
install(DIRECTORY examples/ DESTINATION examples)
install(DIRECTORY drivers/ DESTINATION drivers)
|
640
|
06 Sep 2009 |
Exaos Lee | Suggestion | Could not create strings other than 32 characters with odbedit -c "..." command |
> > Ok, I added a command
> >
> > odbedit -c "create STRING Test[8][40]"
> >
> > which works now. Please update to SVN revision 4555 of odbedit.c
> >
> > - Stefan
>
> If I want to create only one string, should I write like this:
>
> odbedit -c "create STRING Test[] [256]"
>
> OK. I need it. I will try the new odbedit.
"create STRING test[1][256]" works. |