Russell,
Russell J. Page, Sr. wrote:
>
> During Make, I often find an *.h file (which is already in the same
> directory as the corresponding *.c file) being "installed" in the
> include directory above, by the makefile using "INC = file.h". It
> appears that this is not required, but rather it is an attempt by EPICS
> to keep all of it's *.h files together in one place. Question: How does
> Make 'know' where to install the *.h file ?
The main purpose of this installation of .h files is not for the
compilation of the .c file itself, but for other .c files within other
directories which call the library which is being built. The .h file
should be kept in the source directory with the .c file to which it
refers, but can be referenced from anywhere in the base build structure
without having to have lots of -I../somewhere options.
Make installs the INC files into the directory named in the Make
variable INSTALL_INCLUDE. In base/config/CONFIG_COMMON:
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include
INSTALL_LOCATION = $(TOP)
TOP is defined in each Makefile, and points to base.
Note that there is a base/src/include directory which is distributed
with a number of .h files in it, and contains a Makefile.Unix which
lists these in INC so they get installed. Don't confuse this directory
with base/include which is where the .h files get installed into.
-- Andrew
___
.' `. Andrew Johnson, Head of Electronics
/ Royal ) Royal Greenwich Observatory
\ Greenwich Madingley Road, Cambridge, CB3 0EZ
| Observatory Tel: +44 1223 374823 Fax: 374700
+---------- WWW: http://www.ast.cam.ac.uk/~anj
- References:
- INC and install Russell J. Page, Sr.
- Navigate by Date:
- Prev:
RE: Rebooting an IOC Gordon Uchenick
- Next:
Re: Rebooting an IOC Jeff Hill
- 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:
INC and install Russell J. Page, Sr.
- Next:
Rebooting an IOC SAA
- 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
|