Adding to base
This commit is contained in:
43
config/RULES.Db
Normal file
43
config/RULES.Db
Normal file
@@ -0,0 +1,43 @@
|
||||
#RULES.Db
|
||||
SUBTOOL = $(EPICS_BASE_BIN)/subtool
|
||||
PREFIX=$(shell echo $* | sed -e 's-[0-9]--g' | sed -e 's-\.db--g')
|
||||
|
||||
install: .DEPENDS dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) $(PROD)
|
||||
|
||||
buildInstall:: install
|
||||
|
||||
inc build depends:
|
||||
|
||||
dbd:
|
||||
@if [ ! -d $(TOP)/dbd ]; then \
|
||||
mkdir $(TOP)/dbd ; \
|
||||
fi
|
||||
@if [ ! -d dbd ]; then \
|
||||
echo "ln -s $(TOP)/dbd dbd" ; \
|
||||
ln -s $(TOP)/dbd dbd ; \
|
||||
fi
|
||||
|
||||
|
||||
$(DBFROMTEMPLATE):%.db: %.template %.substitutions
|
||||
$(RM) $@
|
||||
$(SUBTOOL) $*.template $*.substitutions > $@
|
||||
|
||||
|
||||
$(INDDBFROMTEMPLATE):%.db: %.substitutions
|
||||
$(RM) $@
|
||||
$(SUBTOOL) $(PREFIX).template $*.substitutions > $@
|
||||
|
||||
.DEPENDS: Makefile
|
||||
@$(RM) $@
|
||||
@for NAME in $(INDDBFROMTEMPLATE) garbage_marty ; do \
|
||||
if [ $$NAME != garbage_marty ] ; then \
|
||||
PREFIX="`echo $$NAME | sed -e 's-[0-9]--g' | sed -e 's-\.db--g'`";\
|
||||
echo "$$NAME: $$PREFIX.template" >> $@;\
|
||||
fi ; \
|
||||
done
|
||||
|
||||
clean::
|
||||
@$(RM) dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) .DEPENDS $(PROD)
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
33
config/RULES.ioc
Normal file
33
config/RULES.ioc
Normal file
@@ -0,0 +1,33 @@
|
||||
#RULES.ioc
|
||||
APPDIR := $(shell grep '.*".*App/' st.* | sed -e 's/.*"\(.*App\).*/\1/' | sort -u )
|
||||
ASCF = $(TOP)/../ascf
|
||||
TARGETBIN = $(TOP)/bin/$(ARCH)
|
||||
|
||||
install: makelinks
|
||||
|
||||
buildInstall:: install
|
||||
|
||||
inc build depends:
|
||||
|
||||
makelinks:
|
||||
@$(RM) ascf bin vxWorks vxWorks.sym dbd share $(APPDIR)
|
||||
ln -s $(ASCF) ascf
|
||||
ln -s $(TARGETBIN) bin
|
||||
ln -s $(TARGETBIN)/vxWorks vxWorks
|
||||
ln -s $(TARGETBIN)/vxWorks.sym vxWorks.sym
|
||||
ln -s $(TOP)/dbd dbd
|
||||
ln -s $(SHARE) share
|
||||
@for dir in $(APPDIR) ; do \
|
||||
if [ -d $(TOP)/$$dir ]; then \
|
||||
ln -s $(TOP)/$$dir $$dir ; \
|
||||
echo "ln -s $(TOP)/$$dir $$dir" ; \
|
||||
elif [ -d $(MASTER_IOCAPPS)/$$dir ]; then \
|
||||
ln -s $(MASTER_IOCAPPS)/$$dir $$dir ; \
|
||||
echo "ln -s $(MASTER_IOCAPPS)/$$dir $$dir" ; \
|
||||
else \
|
||||
echo "$$dir not found" ; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
clean::
|
||||
@$(RM) ascf bin vxWorks vxWorks.sym dbd share $(APPDIR)
|
||||
Reference in New Issue
Block a user