Added ERR_S_FILES to Makefile.* files and removed blderrSymTbl and errInc.*
This commit is contained in:
@@ -27,7 +27,6 @@ SRCS.c += ../cvtFast.c
|
||||
SRCS.c += ../ellLib.c
|
||||
SRCS.c += ../envSubr.c
|
||||
SRCS.c += envData.c
|
||||
SRCS.c += ../errInc.c
|
||||
SRCS.c += ../errMtst.c
|
||||
SRCS.c += ../errPrintfUNIX.c
|
||||
SRCS.c += ../errSymLib.c
|
||||
@@ -74,15 +73,28 @@ LIBNAME = libCom.a
|
||||
|
||||
MAN3 = gpHash.3 freeList.3
|
||||
|
||||
SRC = $(TOP)/src
|
||||
|
||||
ERR_S_FILES += $(TOP)/src/as/asLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/dbAccess.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/drvSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/recSup.h
|
||||
ERR_S_FILES += $(TOP)/src/dbStatic/dbStaticLib.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/ansi/drvEpvxi.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvBitBusErr.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvGpibErr.h
|
||||
ERR_S_FILES += ../tsDefs.h
|
||||
ERR_S_FILES += ../errMdef.h
|
||||
ERR_S_FILES += $(TOP)/src/cas/generic/casdef.h
|
||||
ERR_S_FILES += $(TOP)/src/cas/generic/gddAppFuncTable.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
errSymTbl.o: errSymTbl.c errInc.o errIncCXX.o
|
||||
errSymTbl.o: errSymTbl.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
errSymTbl.c errInc.o errIncCXX.o : ../errInc.c ../errIncCXX.cc
|
||||
@$(RM) errInc.o errIncCXX.o
|
||||
@../blderrSymTbl $(TOP) $(HOST_ARCH) "$(MAKE)"
|
||||
|
||||
envData.c: ../envDefs.h $(TOP)/config/CONFIG_ENV \
|
||||
$(TOP)/config/CONFIG_SITE_ENV
|
||||
../bldEnvData $(TOP)/config
|
||||
@@ -91,5 +103,9 @@ tsTest: tsSubr.o
|
||||
$(LINK.c) -o $@ tsSubr.o -lCom -lDb -lCom -lm -s
|
||||
|
||||
clean::
|
||||
@$(RM) errInc.c errSymTbl.c envData.c
|
||||
@$(RM) errSymTbl.c envData.c
|
||||
|
||||
errSymTbl.c: $(ERR_S_FILES)
|
||||
@/bin/rm -f errSymTbl.c ;\
|
||||
../makeStatTbl $(ERR_S_FILES) >errSymTbl.c
|
||||
|
||||
|
||||
@@ -42,18 +42,34 @@ LIBNAME = libCom
|
||||
|
||||
MAN3 = gpHash.3 freeList.3
|
||||
|
||||
ERR_S_FILES += $(TOP)/src/as/asLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/dbAccess.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/drvSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/recSup.h
|
||||
ERR_S_FILES += $(TOP)/src/dbStatic/dbStaticLib.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/ansi/drvEpvxi.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvBitBusErr.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvGpibErr.h
|
||||
ERR_S_FILES += ../tsDefs.h
|
||||
ERR_S_FILES += ../errMdef.h
|
||||
ERR_S_FILES += $(TOP)/src/cas/generic/casdef.h
|
||||
ERR_S_FILES += $(TOP)/src/cas/generic/gddAppFuncTable.h
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
clean::
|
||||
@$(RM) errSymTbl.c envData.c
|
||||
|
||||
build: errSymTbl.o errInc.o
|
||||
|
||||
errSymTbl.c errInc.o: ../errInc.c
|
||||
@$(RM) errInc.o
|
||||
../blderrSymTbl $(TOP) $(HOST_ARCH) "$(MAKE)"
|
||||
|
||||
envData.c: ../envDefs.h $(TOP)/config/CONFIG_ENV \
|
||||
$(TOP)/config/CONFIG_SITE_ENV
|
||||
../bldEnvData $(TOP)/config
|
||||
|
||||
errSymTbl.o: errSymTbl.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
errSymTbl.c: $(ERR_S_FILES)
|
||||
@/bin/rm -f errSymTbl.c ;\
|
||||
../makeStatTbl $(ERR_S_FILES) >errSymTbl.c
|
||||
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# base/src/tools $Id$
|
||||
# Author: Robert Zieman (ANL)
|
||||
# Date: 6/03/91
|
||||
#
|
||||
# Experimental Physics and Industrial Control System (EPICS)
|
||||
#
|
||||
# Copyright 1991, the Regents of the University of California,
|
||||
# and the University of Chicago Board of Governors.
|
||||
#
|
||||
# This software was produced under U.S. Government contracts:
|
||||
# (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
# and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
#
|
||||
# Initial development by:
|
||||
# The Controls and Automation Group (AT-8)
|
||||
# Ground Test Accelerator
|
||||
# Accelerator Technology Division
|
||||
# Los Alamos National Laboratory
|
||||
#
|
||||
# Co-developed with
|
||||
# The Controls and Computing Group
|
||||
# Accelerator Systems Division
|
||||
# Advanced Photon Source
|
||||
# Argonne National Laboratory
|
||||
#
|
||||
# Modification Log:
|
||||
# -----------------
|
||||
# .00 mm-dd-yy iii Comment
|
||||
# .01 05-04-94 pg HPUX port modifications.
|
||||
# .02 08-25-94 mda use makedepend for HP or Alpha if no GCC
|
||||
# .03 04-28-95 anj use GetVar and case for host arch
|
||||
# .04 06-26-96 joh support for C++
|
||||
# ...
|
||||
#
|
||||
|
||||
# tool to rebuild errSymTbl.c when ../errInc.c or it's depends change
|
||||
|
||||
# Usage blderrSymTbl EPICS HOST_ARCH MAKE VXLIST - IOC and commmon
|
||||
# Usage blderrSymTbl EPICS HOST_ARCH MAKE - just common
|
||||
|
||||
|
||||
GetVar ()
|
||||
{
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "usage: $0 EPICS MAKE VAR_NAME [TARGET_ARCH]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TOP=$1
|
||||
MAKE=$2
|
||||
|
||||
INCLUDE=${TOP}/config/CONFIG_BASE
|
||||
|
||||
if [ -z "$4" ]; then
|
||||
OPTS=""
|
||||
else
|
||||
OPTS="T_A=$4"
|
||||
fi
|
||||
|
||||
PID=$$
|
||||
|
||||
# Construct temporary makefile
|
||||
cat - <<MFILE > /tmp/Makefile.tmp.$$
|
||||
|
||||
TOP=$TOP
|
||||
|
||||
include ${INCLUDE}
|
||||
|
||||
all:
|
||||
@echo "\$($3)" > /tmp/Makefile.tmp.out.$PID
|
||||
|
||||
MFILE
|
||||
|
||||
$MAKE -f /tmp/Makefile.tmp.$$ $OPTS > /dev/null
|
||||
|
||||
# Display value
|
||||
cat /tmp/Makefile.tmp.out.$$
|
||||
|
||||
rm -f /tmp/Makefile.tmp.$$ /tmp/Makefile.tmp.out.$$
|
||||
|
||||
exit 0
|
||||
|
||||
}
|
||||
if [ "x" = "x$4" ]; then
|
||||
DEF="XXX"
|
||||
else
|
||||
DEF="${4}"
|
||||
fi
|
||||
|
||||
TMPMAKEFILE=/tmp/tmpmakefile
|
||||
SFILES=/tmp/sfiles
|
||||
SFILESCXX=/tmp/sfilescxx
|
||||
TOP=$1
|
||||
HOST_ARCH=$2
|
||||
MAKE=$3
|
||||
SRC=$TOP/src
|
||||
INCLUDEH="-I$SRC/include -I$SRC/as -I$SRC/ca -I$SRC/cas/generic -I$SRC/db -I..\
|
||||
-I$SRC/drv/old -I$SRC/drv/ansi -I$SRC/dbStatic -I$SRC/bpt -I$SRC/dev\
|
||||
-I$SRC/gdd -I$SRC/cxxTemplates"
|
||||
|
||||
case $HOST_ARCH in
|
||||
alpha | hp700 | sgi | Linux)
|
||||
# Use gcc if it can be found, or makedepend
|
||||
|
||||
GCC=`which gcc`
|
||||
if [ -x "$GCC" ]; then
|
||||
FILES=`"$GCC" -M -D$DEF $INCLUDEH \
|
||||
../errInc.c 2>/dev/null \
|
||||
| sed -e 's/errInc\.o.*: errInc\.c//' -e 's/\\\//'`
|
||||
else
|
||||
MAKEDEPEND=`which makedepend`
|
||||
if [ -x "$MAKEDEPEND" ]; then
|
||||
FILES=`"$MAKEDEPEND" -f- -D$DEF $INCLUDEH \
|
||||
../errInc.c 2>/dev/null | sed -e 's/errInc.o://' -e 's/\\\//'`
|
||||
else
|
||||
echo Neither GCC or MAKEDEPEND found.
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
GXX =`which g++`
|
||||
if [ -x "$GXX" ]; then
|
||||
FILESCXX=`"$GXX" -M -D$DEF $INCLUDEH \
|
||||
../errIncCXX.cc 2>/dev/null \
|
||||
| sed -e 's/errIncCXX\.o.*: errIncCXX\.cc//' -e 's/\\\//'`
|
||||
else
|
||||
echo no g++ - C++ error codes not generated
|
||||
fi
|
||||
;;
|
||||
solaris)
|
||||
# use -xM option of ACC to list dependencies
|
||||
|
||||
#CC=`$EPICS/base/bin/$HOST_ARCH/GetVar $EPICS "$MAKE" ACC $HOST_ARCH`
|
||||
CC=`GetVar $TOP "$MAKE" ACC $HOST_ARCH`
|
||||
FILES=`$CC -xM -D$DEF $INCLUDEH ../errInc.c \
|
||||
| grep "errInc.o" | grep -v "errInc.c" \
|
||||
| sed -e 's/errInc\.o://'`
|
||||
CXX=`GetVar $TOP "$MAKE" CXX $HOST_ARCH`
|
||||
FILESCXX=`$CXX -xM -D$DEF $INCLUDEH ../errIncCXX.cc \
|
||||
| grep "errIncCXX.o" | grep -v "errIncCXX.cc" \
|
||||
| sed -e 's/errIncCXX\.o *://'`
|
||||
;;
|
||||
sun4)
|
||||
# use -M option of Sun compiler to list make dependencies
|
||||
|
||||
FILES=`cc -M -D$DEF $INCLUDEH ../errInc.c \
|
||||
| grep "errInc.o" | grep -v "errInc.c" \
|
||||
| sed -e 's/errInc\.o://'`
|
||||
|
||||
CXX=`GetVar $TOP "$MAKE" CXX $HOST_ARCH`
|
||||
FILESCXX=`$CXX -xM -D$DEF $INCLUDEH ../errIncCXX.cc \
|
||||
| grep "errIncCXX.o" | grep -v "errIncCXX.cc" \
|
||||
| sed -e 's/errIncCXX\.o *://'`
|
||||
;;
|
||||
*)
|
||||
# Unrecognised host architecture
|
||||
echo $0: host architecture not supported
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
# files with S_ defines
|
||||
grep "^#define[ ]*S_" $FILES /dev/null \
|
||||
| sed -e 's-:.*--' | sort -u >$SFILES
|
||||
grep "^#define[ ]*S_" $FILESCXX /dev/null \
|
||||
| sed -e 's-:.*--' | sort -u >$SFILESCXX
|
||||
|
||||
# create a tmpmakefile
|
||||
echo all: errInc.o errIncCXX.o > $TMPMAKEFILE
|
||||
|
||||
# append C stuff
|
||||
cat $SFILES | (awk '
|
||||
BEGIN {print "errInc.o : ../errInc.c \\"} \
|
||||
{print " "$0" \\" }
|
||||
END {print " ../errMdef.h"}
|
||||
|
||||
') >> $TMPMAKEFILE
|
||||
|
||||
# append C++ stuff
|
||||
cat $SFILESCXX | (awk '
|
||||
BEGIN {print "errIncCXX.o : ../errIncCXX.cc \\"} \
|
||||
{print " "$0" \\" }
|
||||
END {print " ../errMdef.h"}
|
||||
|
||||
') >> $TMPMAKEFILE
|
||||
|
||||
cat >> $TMPMAKEFILE <<!addon
|
||||
/bin/rm -f errSymTbl.c
|
||||
../makeStatTbl \`cat $SFILES $SFILESCXX\` >errSymTbl.c
|
||||
/bin/rm -f errInc.o
|
||||
touch errInc.o
|
||||
/bin/rm -f errIncCXX.o
|
||||
touch errIncCXX.o
|
||||
!addon
|
||||
$MAKE -f $TMPMAKEFILE
|
||||
/bin/rm -f $TMPMAKEFILE $SFILES $SFILESCXX
|
||||
exit 0
|
||||
@@ -1,20 +0,0 @@
|
||||
/* errInc.c */
|
||||
/* share/epicsH $Id$ */
|
||||
/* defines headers containing status codes for epics */
|
||||
|
||||
/* common to epics Unix and vxWorks */
|
||||
#include "dbAccess.h"
|
||||
#include "asLib.h"
|
||||
#include "drvSup.h"
|
||||
#include "devSup.h"
|
||||
#include "recSup.h"
|
||||
#include "tsDefs.h"
|
||||
#include "drvGpibErr.h"
|
||||
#include "drvBitBusErr.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "drvEpvxi.h"
|
||||
#include "devLib.h"
|
||||
#include "errMdef.h"
|
||||
#ifdef VXLIST
|
||||
/* epics vxWorks only*/
|
||||
#endif /* VXLIST */
|
||||
Reference in New Issue
Block a user