Skip to content

CarloWood/cwm4

Repository files navigation

cwm4 git submodule

This repository is a git submodule containing autoconf macros and helper scripts to support building a project that uses git submodules and autotools or cmake.

Checking out a project that uses the cwm4 submodule.

Please read README_usage.

Adding the cwm4 submodule to a project.

To add this submodule to a project, execute the following in the root of the project:

git submodule add https://github.com/CarloWood/cwm4.git

This should clone cwm4 into the subdirectory cwm4, or if you already cloned it there, it should add it.

Next run:

cp cwm4/templates/autogen.sh .
./autogen.sh

and follow the instructions (if any). [autotools only:] If fixing of configure.ac was necessary, run ./autogen.sh again until all issues are fixed.

Finally add autogen.sh to your project:

git add autogen.sh

And commit your changes.

To add support for another submodule, add a file called 'configure.m4' to the root of that submodule -- a template for that file can be found in cwm4/templates/configure.m4. A more complex example can be found in the repository ai-xml-testsuite which uses this as configure.m4 file of the submodule ai-xml.

Cloning this project.

If you make your own clone of cwm4, make sure to set the environment variables GIT_COMMITTER_EMAIL and GIT_COMMITTER_NAME (and likely you also want to set GIT_AUTHOR_EMAIL and GIT_AUTHOR_NAME) and edit cwm4/templates/autogen.sh to use the md5 hash of your GIT_COMMITTER_EMAIL.

echo "$GIT_COMMITTER_EMAIL" | md5sum