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` is leaving compilation debris #246

ydahhrk opened this Issue May 31, 2017 · 0 comments


None yet
1 participant

ydahhrk commented May 31, 2017

$ cd Jool/mod
$ make
$ make clean
$ find . -name "*.o"

@ydahhrk ydahhrk self-assigned this Jun 1, 2017

ydahhrk added a commit that referenced this issue Jun 2, 2017

Enhance `make clean` so objects in `mod/common/nl` are also purged
I don't like this solution at all because it doesn't scale. If we add
more subdirectories to `mod/common`, they need to also be manually
appended to the list. But even if something like `rm common/*.o -r`
worked, it still feels dirty that Kbuild can't do the job on its own.
What if Kbuild decides it wants to create other types of temporary files
that also need to be cleaned?

The problem is that `make clean` doesn't acknowledge the `common`
directory because it's outside of the `stateless` and `stateful`
folders. `common` is supposed to be outside because it doesn't belong to
either; it belongs to both.

I tried going through a full refactor pilgrimage, but nothing came out
of it. It just seems that Kbuild doesn't like it when kernel modules
span more than one directory.

So I don't know what would be the best possible solution. Maybe join the
`stateless`, `stateful` and `common` directories? That would mean I
would have to change the Makefiles such that, for example,

	$ cd stateless
	$ make

would have to be

	$ make stateless

But that's too intrusive for a revision release. Perhaps I should
schedule it for Jool 4.

(Actually, `make stateless` is already perfectly valid within `mod`,
but it's not the documented version of the command. Darn.)

I also thought about putting symlinks inside of both `stateless` and
`stateful`, pointing to `common`. This would place `common` inside of
both and neither at the same time, but I don't know. Things always end
up badly when I try to use symlinks.

Anyway. This will have to do for now.

"Fixes" #246.

@ydahhrk ydahhrk added this to the 3.5.4 milestone Jun 5, 2017

@ydahhrk ydahhrk closed this Jun 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment