Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make (dist)clean does not delete config.h#48

Closed
dilyanpalauzov opened this issue Nov 21, 2019 · 4 comments
Closed

make (dist)clean does not delete config.h #48

dilyanpalauzov opened this issue Nov 21, 2019 · 4 comments

Comments

@dilyanpalauzov
Copy link

./configure creates config.h, but neither "make clean”, nore “make distclean” deletes it. The GNU coding standards convention is to delete with “make distclean” whatever “./configure” creates. I use nsd 4.2.3.

GNU coding standards extract: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets , see “distclean”.

The reproducing procedure is:

I download and unpack nsd-4.2.3. Then I go in the nsd-4.2.3 forder, call ./configure . Then I call ”make disclean; make clean; mkdir build; cd build ; ../configure --enable-mmap --enable-systemd --enable-recvmmsg --with-configdir=/etc/nsd --with-user=nsd ” . This fail because ../config.h. exists and deleting config.h, and re-invoking build/configure ... emits again that ../config.h exists.

So if I run ./configure in the in-source-tree, before doing out-of-source (VPATH) build, “make distclean” shall revert all side-effects of ./configure and let me later perfom VPATH build.

@wcawijngaards
Copy link
Member

Hi! Thanks for the report. Make distclean did not exist. There is make realclean, that does delete config.h but also the created bison and lex files. Added a distclean target that deletes the output of configure. It does not delete the output of bison and flex, that is what realclean does too. There is also devclean and it deletes also configure itself and config.h.in (you have to re-run autoconf, autoheader).

+distclean: clean
+       rm -f Makefile config.h config.log config.status
+       rm -f dnstap/dnstap_config.h

The dnstap header is also produced by configure (in certain cases). Let me know if you want other content in the clean targets, but we seem to have a bunch of them, I appreciate there is a coding standard for it.

@dilyanpalauzov
Copy link
Author

Created bison and flex files shall be deleted by target maintainer-clean, according to the GNU standards/make targets.

@wcawijngaards
Copy link
Member

Okay, in 8ac077f I added maintainer-clean too. As an alias for realclean. I think it is good to be similar to other open source projects to that package maintainers are not surprised and can find their way around more easily.

@wcawijngaards
Copy link
Member

Also for Unbound in NLnetLabs/unbound@f82f971 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants