Subject: |
Re: [makefile] adding a library to an EPICS application |
From: |
Ralph Lange <[email protected]> |
To: |
EPICS Tech Talk <[email protected]> |
Date: |
Thu, 20 Dec 2012 13:22:57 +0100 |
On 20.12.2012 12:55, Pavel Maslov wrote:
> As strange as it may seem, though
>
> DB_INSTALLS += xxx.db
>
> works without specifying the full path, provided all the files are in
> ./, whereas for any other file extension it requires the full path to
> that file.
Yes, correct.
For BESSY we have been using our own rules for a long time, and
something we added there was
# GENERIC_INSTALL_RULE should be called with 3 or 4 arguments:
# $1 extension
# $2 description of file type
# $3 where to install
# $4 (optional) extra vpath dirs
define GENERIC_INSTALL_RULE
vpath %.$1 $(USR_VPATH) $(GENERIC_SRC_DIRS) $4 $(COMMON_DIR)
$3/%.$1: %.$1
$(ECHO) "Installing $2 file $$(@F)"
@$$(INSTALL) -d -m 644 $$< $$(@D)
endef
so you can add the rules to install other file types by using the macro
like (example for .proto files, we actually added ~10 files types we may
want to install)
$(eval $(call
GENERIC_INSTALL_RULE,proto,protocol,$(INSTALL_DB),$(RELEASE_DBSEARCHDIRS)))
The 4th argument sets the search path to the db dirs of all modules in
RELEASE, so after adding this block to the rules, a definition in you
App's Makefile
DB_INSTALLS += xxx.proto
will look for xxx.proto in the db subdirectories of all modules defined
in RELEASE files.
Cheers,
~Ralph
- References:
- [makefile] adding a library to an EPICS application Pavel Maslov
- RE: [makefile] adding a library to an EPICS application Mark Rivers
- Re: [makefile] adding a library to an EPICS application Andrew Johnson
- Re: [makefile] adding a library to an EPICS application Martin Konrad
- Re: [makefile] adding a library to an EPICS application Pavel Maslov
- Re: [makefile] adding a library to an EPICS application Ralph Lange
- Re: [makefile] adding a library to an EPICS application Pavel Maslov
- RE: [makefile] adding a library to an EPICS application Mark Rivers
- Re: [makefile] adding a library to an EPICS application Pavel Maslov
- Re: [makefile] adding a library to an EPICS application Pavel Maslov
- Navigate by Date:
- Prev:
Re: [makefile] adding a library to an EPICS application Pavel Maslov
- Next:
RE: structs and SNL Zelazny, Michael Stanley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [makefile] adding a library to an EPICS application Pavel Maslov
- Next:
devlib2 bugfix (rare string corruption) Till Straumann
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|