Initialize modern autotools projects, Inspired by Mozilla Cargo but without the NIH and currently more limited in scope.
b6ef764feb3a — Arne Babenhauserheide 2 years ago
fix changelog from git
_ and - actually must be forbidden for the makefile generation
note that only . is disallowed in program names

clone

read-only
https://hg.sr.ht/~arnebab/conf
read/write
ssh://hg@hg.sr.ht/~arnebab/conf

#conf - Initialize modern autotools projects

Inspired by Mozilla Cargo ( http://doc.crates.io/guide.html ) but without the NIH and currently more limited in scope.

See NEWS for user-visible changes. See ChangeLog or the history for detailed changes.

#Usage

#Create a new project (example: hello)

conf new hello  --lang bash

The filenames of projects are restricted to lowercase alphanumerics to avoid any problems due to edge-cases in different languages.

#Build and install a project (example: hello)

cd hello && ./bootstrap.sh && ./configure && make && make install

user installation:

cd hello && ./bootstrap.sh && ./configure --prefix ~/.local && make && make install

And generally everything else you can do with autotools. Also see

make help

#Currently implemented languages:

#adding a new language

For a language named LANGUAGE, create the directory templates/LANGUAGE including files that use TEMPLATE_AUTHOR for the user name and TEMPLATE_PROJ for the project name.

Add needed extensions to the configure.ac and Makefile.am templates. You can build upon the generic files in templates/ (i.e. configure.ac) by creating *.head and *.tail files (i.e. configure.ac.tail, Makefile.am.head, Makefile.am.tail). These will then be used as begin (head) or end (tail) of the generated files.

To replace files, create them in your LANGUAGE directory without .head or .tail suffix.

Files and folders named TEMPLATE_PROJ* will be renamed to the project name. For example with a project named foo, _TEMPLATE_PROJ_.py will be renamed foo.py

For complex file structures, you might have to adjust conf.in. Look for test x"${PROJLANG}" to find the place to edit.

For inspiration, look into template/bash since that includes some necessary tricks to access data paths with autotools under bash.

#Requirements

#build conf

./bootstrap.sh ; make

#Install

./bootstrap.sh && make install

To install only for the current user, use

./bootstrap.sh --prefix=$HOME/.local && make install

Also see

make help

For details on installing a release, see INSTALL

#Contributors

See AUTHORS

#Release Process

  • Check/Update NEWS

  • Increase version in configure.ac (see semver.org)

  • Commit, merge to stable and tag (see branching[^1])

      ./bootstrap.sh && make distcheck
    

[^1]: maintainer action "do a release" in http://www.draketo.de/branching-strategy#action-maintainer

#Planning

We need bash for Makefiles, so we can use bash for scripting.