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 clean broken #4493

Open
guimard opened this issue Apr 28, 2023 · 4 comments
Open

make clean broken #4493

guimard opened this issue Apr 28, 2023 · 4 comments

Comments

@guimard
Copy link
Contributor

guimard commented Apr 28, 2023

Hi,

to fix (Debian #1034088), I had to recreate Makefile.PL before calling make clean (in debian/rules file):

override_dh_auto_clean:
        perl -pe 's#\@top_srcdir\@#../..#' <perl/annotator/Makefile.PL.in >perl/annotator/Makefile.PL
        dh_auto_clean
@elliefm
Copy link
Contributor

elliefm commented May 1, 2023

curious, I wonder when/why/how it gets removed

@elliefm
Copy link
Contributor

elliefm commented May 1, 2023

Ah, I see, it's make distclean that fails, which I can reproduce upstream...

It fails because make distclean first cleans up all the perl stuff due to it being in EXTRA_DIST, and then it recurses through the DIST_SUBDIRS and tries to make distclean in those too. At this point, perl/annotator/Makefile still exists, but it contains a high level rule that wants to rebuild itself from Makefile.PL first, which has already been removed, so it fails with *** No rule to make target 'Makefile.PL', needed by 'Makefile'. Stop.. There is no such rule because this file was never generated by make, it was generated by the top level configure.

So really, the problem is that the perl stuff is listed in both EXTRA_DIST and DIST_SUBDIRS, and so gets cleaned twice. I think the "right" place is DIST_SUBDIRS, and it should theoretically be removed from EXTRA_DIST. But we've tried that before, and the commit message of 14ce773 suggests that it's important for them to be in there after all, because it resolves a different incompatibility between the autotools top level and the MakeMaker subdirectories...

So, at the moment, I don't think there's a good solution here. We're always fighting with the autotools/MakeMaker incompatibility in one way or another, and this is just another way. I think your workaround in debian/rules is probably as good as it's going to get.

This doesn't really effects us upstream, because I think we mostly use git clean rather than any of the make [x]clean varieties.

@guimard
Copy link
Contributor Author

guimard commented May 12, 2023

Thanks @elliefm !

@guimard
Copy link
Contributor Author

guimard commented Aug 14, 2023

Hi @elliefm,

Things got worse with version 3.8.0. Now it is impossible to run any "make clean" without errors. This creates a Debian's Policy violation. Do you see a way to fix this?
Also some source files are deleted during build

@guimard guimard changed the title Missing perl/annotate/Makefile.PL after build breaks clean make clean borken Aug 17, 2023
@guimard guimard changed the title make clean borken make clean broken Aug 17, 2023
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