You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <qp...@incubator.apache.org> on 2007/03/05 17:08:50 UTC

[jira] Commented: (QPID-243) Inconsistent use of paths in #includes

    [ https://issues.apache.org/jira/browse/QPID-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478086 ] 

Alan Conway commented on QPID-243:
----------------------------------

To be resolved by a directory re-organization as follows:

Goals:
 - consistent mapping between file paths and class names.
 - consistent #include usage for svn and installed headers. 
 - consistent source paths for debuggers, valgrind etc.
 - flexible packaging into libraries, executables (e.g. libqpidc, libqpidd)
 - full dependencies, e.g. from clean co "make test/FooBarTest.so"
   can build all the dependencies to run that test.
 ? Faster build - single makefile tends to be faster, esp as tree gets bigger.
 - consistent user #includes. User has 2 options:
  - install in standard place, no -I, #include <qpid/client/Message.h>
  - -I /usr/include/qpid, #include <client/Message.h>
 
Approach:
 - single makefile in src/ builds all libs, exes, tests.
 - subdirectory per namespace
 - files named after classes
 - #includes in .h files are relative:
  - in src:    #include "client/Message.h"
  - in subdir: #include "../client/Message.h"
 - .cpp files: #include "client/Message.h"
 - User code with installed headers as above.

Outline:
 
src/
 Makefile.am - include makefile.mk from subdirs
 *.cpp *.h - sources in qpid namespace

 client/ - sources in qpid::client namespace
  makefile.mk - lists client sources with path, e.g. client/Message.cpp
  *.cpp, *.h - client sources

 broker/   \
 sys/       - As for client/ for other namespaces
 framing/  /

 tests/ - test code.
  makefile.mk - test make fragment.

NOTES:
Use: "g++ -c -o path/file.cpp path/file.o" to put .o files in subdir.
Autoconf/automake supports use of -o.
Autoconf needs to check for -o option: AM_PROG_CC_C_O is for C, verify
if this works for C++ or there's another option.


> Inconsistent use of paths in #includes
> --------------------------------------
>
>                 Key: QPID-243
>                 URL: https://issues.apache.org/jira/browse/QPID-243
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker, C++ Client
>            Reporter: Alan Conway
>         Assigned To: Alan Conway
>
> 1. With the new release, I have to specify -I${QPID_REL}/include/qpidc,
> -I${QPID_REL/include/qpidc/framing and -I${QPID_REL/include/qpidc/sys when
> I build which is really naff.
> This is because things like Connector.h do a #include
> <framing/InputHandler.h>, but then "framing/InputHandler.h" only #include
> <AMQFrame.h> and AMQFrame.h is located in the framing sub-directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.