Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: RE: class library header file naming and install conventions
From: "Jeff Hill" <johill@lanl.gov>
To: "'Andrew Johnson'" <anj@aps.anl.gov>
Cc: core-talk@aps.anl.gov
Date: Tue, 15 Mar 2011 11:38:52 -0600
> On Tuesday 15 March 2011 11:35:18 Jeff Hill wrote:
> > Maybe the library's Makefile looks something like this in the future?
> >
> > LIBRARY=pdq
> >
> > INC += pdq.h
> > INC_pdq += pdq/Xxxx.h
> > INC_pdq += pdq/Yyyy.h
> 
> No need, use INC instead of INC_pdq and the current build system does
> exactly what you want:
> 
> tux% mkdir xxx
> tux% echo Hello > xxx/xxx.h
> tux% grep xxx.h Makefile
> INC += xxx/xxx.h
> tux% make

Yes, I am testing what you suggest since yesterday evening, and it works,
but as Ralph and I were discussing its perhaps a bit awkward to not have the
source files, and the header files, at the same level. Its maybe a bit odd
to have a requirement that the publically consumed relative path headers
must be stored in a subdirectory named pdq? A side benefit of not using a
subdirectory BTW is that when writing Xxx.cpp we can "#include Xxxx.h" and
not "#include pdq/Xxxx.h". In that pdq specific context we don?t really need
to be specific. In a user code, if we don?t have "#include pdq.h", then we
shouldn?t be surprised that we need to be very specific specifying "#include
"pdq/Xxxx.h" because we don?t want to collide with xyz/Xxxx.h.

Admittedly, a benefit of maintaining publically consumed self relative
headers in the pdq subdirectory is organization (one look at the source tree
tells one what gets exported). However that path "$(BASE)/src/pdq/pdw" or
"$(BASE)/src/pdq/lib/pdw" or "$(BASE)/src/pdq/src/pdw", any of them, is
going to appear to be a bit weak when reviewed at the department of
redundancies department.

There was a typo in my previous message. I meant this.

LIBRARY=pdq

INC += pdq.h
INC_pdq += Xxxx.h
INC_pdq += Yyyy.h

My intention was that all of {pdq.h, Xxxx.h, Xxxx.cpp, Yyyy.cpp, Yyyy.h}
might be maintained at the same source path (where the Makefile is located),
but that only Xxxx.h and Yyyy.h are installed to $(INSTALL_PATH)/include/pdq
while pdq.h is installed to $(INSTALL_PATH)/include.

I am looking at the build rules.

Jeff
______________________________________________________
Jeffrey O. Hill           Email        johill@lanl.gov
LANL MS H820              Voice        505 665 1831
Los Alamos NM 87545 USA   FAX          505 665 5107

Message content: TSPA

With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925


> -----Original Message-----
> From: Andrew Johnson [mailto:anj@aps.anl.gov]
> Sent: Tuesday, March 15, 2011 10:58 AM
> To: Jeff Hill
> Cc: core-talk@aps.anl.gov; 'Janet Anderson'
> Subject: Re: class library header file naming and install conventions
> 
> On Tuesday 15 March 2011 11:35:18 Jeff Hill wrote:
> > Maybe the library's Makefile looks something like this in the future?
> >
> > LIBRARY=pdq
> >
> > INC += pdq.h
> > INC_pdq += pdq/Xxxx.h
> > INC_pdq += pdq/Yyyy.h
> 
> No need, use INC instead of INC_pdq and the current build system does
> exactly
> what you want:
> 
> tux% mkdir xxx
> tux% echo Hello > xxx/xxx.h
> tux% grep xxx.h Makefile
> INC += xxx/xxx.h
> tux% make
> ...
> Installing generic include file ../../../include/xxx/xxx.h
> mkdir ../../../include/xxx
> ...
> 
> - Andrew
> --
> An error is only a mistake if you don't learn from it.
> When you learn something from it, it becomes a lesson.



Replies:
Re: class library header file naming and install conventions Andrew Johnson
References:
class library header file naming and install conventions Jeff Hill
RE: class library header file naming and install conventions Jeff Hill
RE: class library header file naming and install conventions Jeff Hill
Re: class library header file naming and install conventions Andrew Johnson

Navigate by Date:
Prev: Re: class library header file naming and install conventions Andrew Johnson
Next: Re: class library header file naming and install conventions Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Re: class library header file naming and install conventions Andrew Johnson
Next: Re: class library header file naming and install conventions Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·