Makefile Names And Organisation
The directory structure is described in NewinfraCatalogues.html. Almost every
Most of the Makefile.am files have an include statement at the end, by
The "am-shared" dir
There are three types of files in the am-shared dir, each with their own
1. named after the dir of the including file (these files should always be
-
doc-dir-include.am
-
src-morphology-dir-include.am => included by the following file:
src/morphology/Makefile.am -
tools-grammarcheckers-dir-include.am
-
tools-spellcheckers-fstbased-hfst-dir-include.am
- tools-spellcheckers-dir-include.am
2. named after the type of source file to be processed by the makefile. These
-
vislcg3-include.am => compile vislcg3 files
-
twolc-include.am => compile twolc files
- regex-include.am => compile regex files
3. named after configure option/application-specific targets, and after the
-
src_dictionary-include.am => included by src-dir-include.am
-
src_oahpa-include.am
- src_mt-include.am
Summary: it is possible to programmatically identify all three types:
- main include files contain the string -dir-
- configure option include files contain underscore ( _ )
- general compilation file names based on source type include neither
Other (regular) dirs
The Automake files are everywhere else named Makefile.am.
Therer are a couple of conventions to observe:
- the target clean-local: should always be defined in the local
Makefile.am - not in the include files; if there is a need to define clean operations in the include files, it should be through the use of the variable CLEANFILES, e.g. something like:
CLEANFILES=$(BUILDFILES) - the include file am-shared/silent_build-include.am should only be included
by the *-dir-include.am files to avoid double inclusion and subsequent double definitions of the same variables
There might be some violations of these conventions, they should be cleaned up

