Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Building StreamDevice 2-4 / SynApps / Win32
From: John Dobbins <john.dobbins@cornell.edu>
To: EPICS Tech-Talk <tech-talk@aps.anl.gov>
Date: Fri, 12 Mar 2010 14:47:05 -0500
First, thanks to everyone for the help with understanding what the problem was in the first place, i.e. that one of the StreamDevice Makefiles depends on certain shell capabilities.

I like the fact that I have been able to build EPICS on Windows with the only the dependencies being GnuMake and Perl. So what I have done is to change the StreamDevice Makefile to call two new Perl scripts. My Makefile for the StreamDevice src directory now looks like:

MAKE_STREAM_DBD_CMD = "../makeStreamDbd.pl"
MAKE_STREAM_REFERENCES_CMD = "../makeStreamReferences.pl"
.
.
.
streamReferences: ../CONFIG_STREAM
	@$(MAKE_STREAM_REFERENCES_CMD) $(BUSSES) : $(FORMATS)

# create stream.dbd from all RECORDS
$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM @$(MAKE_STREAM_DBD_CMD) $(COMMON_DIR) $(LIBRARY_DEFAULT) $(RECORDS)


I have attached the the Perl scripts I created.

Feel free to suggest improvements that would make this better conform to the standards of the EPICS build system.


John Dobbins












John Dobbins wrote:
Dear All,

I am trying to build StreamDevice 2-4 on win32-x86

I happen to be using the synApps source and the Makefile is show below

The directories structure is:
support/
asyn
.
.
.
std
stream
Everything works fine until I get to stream at which point I get the cryptic error "r was unexpected at this time."


details:

make[4]: Entering directory `W:/winDev/epics/R3.14.10/support/stream/2-4/StreamDevice-2-4/src/O.win32-x86'
r was unexpected at this time.
make[4]: *** [../O.Common/stream.dbd] Error 255
make[4]: Leaving directory `W:/winDev/epics/R3.14.10/support/stream/2-4/StreamDevice-2-4/src/O.win32-x86'
make[3]: *** [install.win32-x86] Error 2
make[3]: Leaving directory `W:/winDev/epics/R3.14.10/support/stream/2-4/StreamDevice-2-4/src'
make[2]: *** [src.install] Error 2
make[2]: Leaving directory `W:/winDev/epics/R3.14.10/support/stream/2-4/StreamDevice-2-4'
make[1]: *** [StreamDevice-2-4.install] Error 2
make[1]: Leaving directory `W:/winDev/epics/R3.14.10/support/stream/2-4'
make: *** [W:/winDev/epics/R3.14.10/support/stream/2-4.install] Error 2


W:/winDev/epics/R3.14.10/support/stream/2-4/StreamDevice-2-4/src/O.win32-x86' looks like


#This Makefile created by makeMakefile.pl


all : $(MAKE) -f ../Makefile TOP=../../.. T_A=win32-x86 $@

  .DEFAULT: force
	  $(MAKE) -f ../Makefile TOP=../../.. T_A=win32-x86  $@

force: ;


Advice anyone?



Thanks,


John Dobbins
Lab for Elementary Particle Physics
Cornell University










#FILENAME: Makefile #USAGE: Top Makefile #Version: 1.5 #Modified By: mooney #Last Modified: 2009/03/06 21:31:25 #NOTES- The "SUPPORT_DIRS" order is based on compile time dependencies. # - The user must modify SUPPORT and EPICS_BASE in the # <synApps>/support/configure directory for the local configuration. # - To support multiple configurations, use multiple configure* directories # - Support modules can be shared between configurations only if # dependencies are not violated. Only the "DIRS" are the target of # gnumake. If this configuration is using a support module built by # another configuration, then the SUPPORT_DIRS line for that support # module must be commented out (i.e, must begin with a '#').

# Note the only dependencies that matter in $(<module>)_DEPEND_DIRS are
# compile-time dependencies.

TOP = .

MASTER_FILE = $(TOP)/configure/RELEASE.win32-x86

include $(TOP)/configure/CONFIG

###### 1st Tier Support Modules - Only Depend on EPICS BASE ######


SUPPORT_DIRS += $(SNCSEQ) RELEASE_FILES += $(SNCSEQ)/configure/RELEASE.win32-x86

SUPPORT_DIRS += $(SSCAN)
RELEASE_FILES += $(SSCAN)/configure/RELEASE.win32-x86

SUPPORT_DIRS += $(AUTOSAVE)
RELEASE_FILES += $(AUTOSAVE)/configure/RELEASE.win32-x86

###### 2nd Tier Support Modules - Only Depend on 1st Tier ########

SUPPORT_DIRS += $(ASYN)
RELEASE_FILES += $(ASYN)/configure/RELEASE.win32-x86
$(ASYN)_DEPEND_DIRS = $(SNCSEQ)

SUPPORT_DIRS += $(CALC)
RELEASE_FILES += $(CALC)/configure/RELEASE.win32-x86
$(CALC)_DEPEND_DIRS = $(SSCAN)

################### 3rd Tier Support Modules #####################

SUPPORT_DIRS += $(BUSY)
RELEASE_FILES += $(BUSY)/configure/RELEASE.win32-x86
$(BUSY)_DEPEND_DIRS = $(ASYN)

SUPPORT_DIRS += $(STD)
RELEASE_FILES += $(STD)/configure/RELEASE.win32-x86
$(STD)_DEPEND_DIRS = $(ASYN)

SUPPORT_DIRS += $(STREAM)
RELEASE_FILES += $(STREAM)/configure/RELEASE.win32-x86
$(STREAM)_DEPEND_DIRS = $(ASYN) $(CALC) $(SSCAN)


################### 4th Tier Support Modules #####################


#SUPPORT_DIRS += $(MCA)
#RELEASE_FILES += $(MCA)/configure/RELEASE.win32-x86
#$(MCA)_DEPEND_DIRS = $(ASYN) $(STD)


################### 5th Tier Support Modules #####################


#SUPPORT_DIRS += $(AREA_DETECTOR)
#RELEASE_FILES += $(AREA_DETECTOR)/configure/RELEASE.win32-x86
#$(AREA_DETECTOR)_DEPEND_DIRS = $(ASYN) $(SSCAN) $(MCA)


################### End of Support-Modules #####################


DIRS = $(SUPPORT_DIRS)

################### User Modules #####################



ACTIONS += uninstall realuninstall distclean cvsclean

include $(EPICS_BASE)/configure/RULES_TOP

release:
	echo SUPPORT=$(SUPPORT)
	echo ' '
	echo EPICS_BASE=$(EPICS_BASE)
	echo ' '
	echo MASTER_FILE=$(MASTER_FILE)
	echo ' '
	echo DIRS=$(DIRS)
	echo ' '
	echo RELEASE_FILES=$(RELEASE_FILES)
	echo ' '
	$(PERL) $(TOP)/configure/makeReleaseConsistent.pl $(SUPPORT) $(EPICS_BASE) $(MASTER_FILE) $(RELEASE_FILES)

$common_dir = $ARGV[0];
$file_name  = $ARGV[1];
@records = @ARGV[2..$#ARGV];

unless( open( OUTFILE, ">$common_dir/$file_name.dbd")) { print "makeStreamDbd.pl couldn't open output file\n";}

foreach ( @records )
{
	$r = $_;
    $out_line = "device(" .+ $r .+ ",INST_IO,device" .+ $r .+ "Stream,\"stream\")\n";
    print OUTFILE $out_line;
}

print OUTFILE "driver(stream)\n";
print OUTFILE "variable(streamDebug, int)\n";
print OUTFILE  "registrar(streamRegistrar)\n";

close (OUTFILE);
$file_name = "streamReferences";

$found_separator = "false";

unless( open( OUTFILE, ">$file_name")) { print "makeStreamReferences.pl couldn't open output file\n";}

foreach ( @ARGV )
{
	$arg = $_;
	
	if($arg eq ":") 
	{  
		$found_separator = "true";
		next;
	}
	
	if ($found_separator eq "false")
	{
		$out_line = "extern void* ref_" .+ $arg .+ "Interface;\n";
		print OUTFILE $out_line;
		$out_line = "void* p" .+ $arg .+ " = ref_" .+ $arg .+ "Interface;\n";
		print OUTFILE $out_line;
	}
    else
	{
		$out_line = "extern void* ref_" .+ $arg .+ "Converter;\n";
		print OUTFILE $out_line;
		$out_line = "void* p" .+ $arg .+ " = ref_" .+ $arg .+ "Converter;\n";
		print OUTFILE $out_line;
	}

}

close (OUTFILE);


Replies:
RE: Building StreamDevice 2-4 / SynApps / Win32 John Dobbins
References:
Building StreamDevice 2-4 / SynApps / Win32 John Dobbins

Navigate by Date:
Prev: Controls Application Programmer Position at SLAC Ernest L. Williams Jr.
Next: RE: Building StreamDevice 2-4 / SynApps / Win32 John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Building StreamDevice 2-4 / SynApps / Win32 J. Lewis Muir
Next: RE: Building StreamDevice 2-4 / SynApps / Win32 John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·