Momentics: dealing with header files

I am using Momentics and would like to set up the makefiles to handle header
files properly. Here are my questions:

  • if I change a header (.h) file without changing a source file that
    includes the header file, the Makefile still thinks the compile target is
    up-to-date. is the only way to solve this problem to set up a list of
    dependencies, e.g. file.cc: file.h?

  • if I create a make target that generates the dependency file, how can I
    get that make target to only “execute” (make the dependency file) at the top
    level of the project directory (with the .cc and h file), rather than in the
    directories with the object files? i.e., how can I get the makefiles “to
    not recurse”?

  • there is functionality to install a library externally to the project
    directory (via INSTALLDIR). is there a similar functionality to install a
    public header file, externally to the project directory, built into the
    Makefile structure of Momentics? If I just try to copy the header files via
    a make target, I have the same problem as the previous question with
    recursion. I just want to copy the header files at the same level as the
    …cc files, not from the object file directory.

Thanks.

– Celia

I figured out the recursion issue. I need to put my targets in the top
level Makefile, not in common.mk. I could still use help with the other
issues (re-compile when .h files change, installing a public header file).
Thanks.

– Celia

“Celia” <celiaonline@attbi.com> wrote in message
news:bk0t29$ah7$1@inn.qnx.com

I am using Momentics and would like to set up the makefiles to handle
header
files properly. Here are my questions:

  • if I change a header (.h) file without changing a source file that
    includes the header file, the Makefile still thinks the compile target is
    up-to-date. is the only way to solve this problem to set up a list of
    dependencies, e.g. file.cc: file.h?

  • if I create a make target that generates the dependency file, how can I
    get that make target to only “execute” (make the dependency file) at the
    top
    level of the project directory (with the .cc and h file), rather than in
    the
    directories with the object files? i.e., how can I get the makefiles “to
    not recurse”?

  • there is functionality to install a library externally to the project
    directory (via INSTALLDIR). is there a similar functionality to install a
    public header file, externally to the project directory, built into the
    Makefile structure of Momentics? If I just try to copy the header files
    via
    a make target, I have the same problem as the previous question with
    recursion. I just want to copy the header files at the same level as the
    .cc files, not from the object file directory.

Thanks.

– Celia

Dependency checking was not implemented for 6.2.1B. It will be certainly
included in the upcomming release.

About extra include files (if you are talking about include files other than
standard system includes from /usr/include) I guess you can use
EXTRA_INCVPATH environment variable for that (just add it to your
environment).

“Celia” <celiaonline@attbi.com> wrote in message
news:bk0tu9$b3o$1@inn.qnx.com

I figured out the recursion issue. I need to put my targets in the top
level Makefile, not in common.mk. I could still use help with the other
issues (re-compile when .h files change, installing a public header file).
Thanks.

– Celia

“Celia” <> celiaonline@attbi.com> > wrote in message
news:bk0t29$ah7$> 1@inn.qnx.com> …
I am using Momentics and would like to set up the makefiles to handle
header
files properly. Here are my questions:

  • if I change a header (.h) file without changing a source file that
    includes the header file, the Makefile still thinks the compile target
    is
    up-to-date. is the only way to solve this problem to set up a list of
    dependencies, e.g. file.cc: file.h?

  • if I create a make target that generates the dependency file, how can
    I
    get that make target to only “execute” (make the dependency file) at the
    top
    level of the project directory (with the .cc and h file), rather than in
    the
    directories with the object files? i.e., how can I get the makefiles
    “to
    not recurse”?

  • there is functionality to install a library externally to the project
    directory (via INSTALLDIR). is there a similar functionality to install
    a
    public header file, externally to the project directory, built into the
    Makefile structure of Momentics? If I just try to copy the header files
    via
    a make target, I have the same problem as the previous question with
    recursion. I just want to copy the header files at the same level as
    the
    .cc files, not from the object file directory.

Thanks.

– Celia

\

I am interested in installing a header file I create, rather than just
including additional header files in my code.

– Celia

“Alex Chapiro” <achapiro@qnx.com> wrote in message
news:bk53ff$bg8$1@inn.qnx.com

Dependency checking was not implemented for 6.2.1B. It will be certainly
included in the upcomming release.

About extra include files (if you are talking about include files other
than
standard system includes from /usr/include) I guess you can use
EXTRA_INCVPATH environment variable for that (just add it to your
environment).

“Celia” <> celiaonline@attbi.com> > wrote in message
news:bk0tu9$b3o$> 1@inn.qnx.com> …
I figured out the recursion issue. I need to put my targets in the top
level Makefile, not in common.mk. I could still use help with the other
issues (re-compile when .h files change, installing a public header
file).
Thanks.

– Celia

“Celia” <> celiaonline@attbi.com> > wrote in message
news:bk0t29$ah7$> 1@inn.qnx.com> …
I am using Momentics and would like to set up the makefiles to handle
header
files properly. Here are my questions:

  • if I change a header (.h) file without changing a source file that
    includes the header file, the Makefile still thinks the compile target
    is
    up-to-date. is the only way to solve this problem to set up a list of
    dependencies, e.g. file.cc: file.h?

  • if I create a make target that generates the dependency file, how
    can
    I
    get that make target to only “execute” (make the dependency file) at
    the
    top
    level of the project directory (with the .cc and h file), rather than
    in
    the
    directories with the object files? i.e., how can I get the makefiles
    “to
    not recurse”?

  • there is functionality to install a library externally to the
    project
    directory (via INSTALLDIR). is there a similar functionality to
    install
    a
    public header file, externally to the project directory, built into
    the
    Makefile structure of Momentics? If I just try to copy the header
    files
    via
    a make target, I have the same problem as the previous question with
    recursion. I just want to copy the header files at the same level as
    the
    .cc files, not from the object file directory.

Thanks.

– Celia



\

There should be hinstall target. Make copies files located in public
subdirectory to INSTALL_ROOT_{os}/include directory, where {os} is one of
nto, win32, solaris, linux, qnx4. Public directories can be
$(PROJECT_ROOT)/{public | public/include* | user-specified }.

“Celia” <celiaonline@attbi.com> wrote in message
news:bk65ep$418$1@inn.qnx.com

I am interested in installing a header file I create, rather than just
including additional header files in my code.

– Celia

“Alex Chapiro” <> achapiro@qnx.com> > wrote in message
news:bk53ff$bg8$> 1@inn.qnx.com> …
Dependency checking was not implemented for 6.2.1B. It will be certainly
included in the upcomming release.

About extra include files (if you are talking about include files other
than
standard system includes from /usr/include) I guess you can use
EXTRA_INCVPATH environment variable for that (just add it to your
environment).

“Celia” <> celiaonline@attbi.com> > wrote in message
news:bk0tu9$b3o$> 1@inn.qnx.com> …
I figured out the recursion issue. I need to put my targets in the
top
level Makefile, not in common.mk. I could still use help with the
other
issues (re-compile when .h files change, installing a public header
file).
Thanks.

– Celia

“Celia” <> celiaonline@attbi.com> > wrote in message
news:bk0t29$ah7$> 1@inn.qnx.com> …
I am using Momentics and would like to set up the makefiles to
handle
header
files properly. Here are my questions:

  • if I change a header (.h) file without changing a source file that
    includes the header file, the Makefile still thinks the compile
    target
    is
    up-to-date. is the only way to solve this problem to set up a list
    of
    dependencies, e.g. file.cc: file.h?

  • if I create a make target that generates the dependency file, how
    can
    I
    get that make target to only “execute” (make the dependency file) at
    the
    top
    level of the project directory (with the .cc and h file), rather
    than
    in
    the
    directories with the object files? i.e., how can I get the
    makefiles
    “to
    not recurse”?

  • there is functionality to install a library externally to the
    project
    directory (via INSTALLDIR). is there a similar functionality to
    install
    a
    public header file, externally to the project directory, built into
    the
    Makefile structure of Momentics? If I just try to copy the header
    files
    via
    a make target, I have the same problem as the previous question with
    recursion. I just want to copy the header files at the same level
    as
    the
    .cc files, not from the object file directory.

Thanks.

– Celia





\