Autotools: how to cleanup files created by “./configure” in lighttpd project?

前端 未结 2 1730
挽巷
挽巷 2021-02-06 22:48

I\'m trying out lighttpd for an embedded Linux project. I got the latest source package and started writing a master Makefile encapsulating all configure, compile,

2条回答
  •  不要未来只要你来
    2021-02-06 23:25

    I personally would really use the features of a source control software (you should use one) for this. This would cleanup make independent of your build process. See e.g. svn-cleanup or git clean.

    Nevertheless, automake allows some tweaking when to remove which files. This has (intentionally?) built-in limitations on what files generated by autotools can be remove this way though. Have a look at the definitions for MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, and MAINTAINERCLEANFILES and adjust your Makefile.am's. With them you can remove a lot of stuff with

    make mostlyclean
    make clean
    make distclean
    make maintainer-clean
    

    You won't be able to remove e.g. Makefile or .deps/ this way.

    As for the reliability of make clean it should "work 100%" if you stick to cleanly specifying your files and stay away from manual intervention. Otherwise extend the cleanup rules.

提交回复
热议问题