njh / twolame

MPEG Audio Layer 2 (MP2) encoder
http://www.twolame.org/
GNU Lesser General Public License v2.1
59 stars 34 forks source link

build: fix when maintainer mode disabled #54

Closed aleksander0m closed 7 years ago

aleksander0m commented 7 years ago

If maintainer mode is disabled explicitly, the build should succeed skipping man pages and doxygen documentation. Currently this was breaking because there were rules referencing built files out of the MAINTAINER_MODE block.

In doc/html, there shouldn't be rules requiring doxygen.css or any other generated file out of the MAINTAINER_MODE block:

make[2]: Entering directory '/home/aleksander/Development/clients/azimut/twolame/doc/html'
make[2]: *** No rule to make target 'doxygen.css', needed by 'all-am'.  Stop.
make[2]: Leaving directory '/home/aleksander/Development/clients/azimut/twolame/doc/html'
make[1]: *** [Makefile:480: all-recursive] Error 1
make[1]: Leaving directory '/home/aleksander/Development/clients/azimut/twolame/doc'
make: *** [Makefile:468: all-recursive] Error 1

In doc/, there shouldn't be rules requiring twolame.1 or any other generated file out of the MAINTAINER_MODE block:

make[2]: Entering directory '/home/aleksander/Development/clients/azimut/twolame/doc'
make[2]: *** No rule to make target 'twolame.1', needed by 'all-am'.  Stop.
make[2]: Leaving directory '/home/aleksander/Development/clients/azimut/twolame/doc'
make[1]: *** [Makefile:480: all-recursive] Error 1
make[1]: Leaving directory '/home/aleksander/Development/clients/azimut/twolame/doc'
make: *** [Makefile:468: all-recursive] Error 1
njh commented 7 years ago

Thanks, this looks like a good improvement.

I guess I had never intended non-maintainers to build from Git.

njh commented 7 years ago

Getting an error in the build now:

autogen.sh: Running automake --gnu --add-missing --force --copy -Wall
configure.ac:48: installing `build-scripts/ar-lib'
configure.ac:53: installing `build-scripts/config.guess'
configure.ac:53: installing `build-scripts/config.sub'
configure.ac:17: installing `build-scripts/install-sh'
configure.ac:17: installing `build-scripts/missing'
doc/Makefile.am:24: MAINTAINERCLEANFILES was already defined in condition TRUE, which includes condition MAINTAINER_MODE ...
doc/Makefile.am:10: ... `MAINTAINERCLEANFILES' previously defined here
frontend/Makefile.am: installing `build-scripts/depcomp'
Makefile.am: installing `./INSTALL'

https://travis-ci.org/njh/twolame/builds/261168426#L643