]> git.tuebingen.mpg.de Git - lopsub.git/commit
Merge branch 't/build-improvements'
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 9 May 2021 14:47:26 +0000 (16:47 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 9 May 2021 14:47:26 +0000 (16:47 +0200)
commit511c65e28799c08d17ebdf7b10a4e15e702958f7
tree649448d48b37dd6aac98201aaa62786d3408ba3f
parent61ec5823d7b64fcdfab8c0ddb959bd68dd90e07a
parent45901057b4103eeb745e080521678c0e43e0eca1
Merge branch 't/build-improvements'

The build system fails in unexpected ways when required programs like
m4 or flex are not installed. One particular problem is a construct
of the form

    $(M4) ... > $@

in the recipe of the lopsub.h target. If m4 is not installed, this
results in an empty lopsub.h file, which is considered up-to-date
by subsequent runs of make(1). The subsequent compilation of lsg.c
succeeds despite of the empty lopsub.h, but the resulting executable
segfaults.

The reason is that lsg1.c includes lopsub.h to declare lls_version(),
but due to lopsub.h being empty, the declaration is missing and the
compiler implicitly assumes an int return value rather than char *.

This patch series addresses this problem in several ways. With the
series applied:

* the build fails early if m4 or flex are not installed,
* missing function declarations are considered errors rather than warnings,
* incompletely written targets are removed by make(1).