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

build-systems: remove autotools and Android.mk, upgrade CI infrastructure #527

Merged

Conversation

marckleinebudde
Copy link
Member

@marckleinebudde marckleinebudde commented May 23, 2024

Remove plain old Makefile and autotools support. This clauses less friction when adding new tools.

Closes: #526

@marckleinebudde marckleinebudde force-pushed the buildsystems-cleanup branch 3 times, most recently from 60f50cd to 5a9ec5a Compare May 23, 2024 07:07
@marckleinebudde
Copy link
Member Author

marckleinebudde commented May 23, 2024

Our github workflow only runs autotools, I'll convert it to camke.

@hartkopp
Copy link
Member

IMHO removing autotools and its infrastructure is a good choice.
No need to have autotools and cmake in parallel as these are doing the same.

But I'm not sure if it is a good idea to drop the 'plain' Makefile as it enables (embedded) systems to build and run can-utils without any additional build system.

Instead I would check the possibility to build the Android binaries with cmake too.
There are ongoing discussions which suggest to use cmake in new projects for Android:
https://stackoverflow.com/questions/39589427/difference-between-cmake-and-ndk-build-in-android-studio-project

And then we finally would have a cmake and a plain Makefile support.

@marckleinebudde
Copy link
Member Author

But I'm not sure if it is a good idea to drop the 'plain' Makefile as it enables (embedded) systems to build and run can-utils without any additional build system.

I think it's a very good idea to drop plain Makefile support.

You want to build can-utils on your embedded system? IMHO if you have a compiler, having cmake doesn't make a big difference.

@marckleinebudde
Copy link
Member Author

Regarding Android. I'm not invested, don't use it and cannot test it. If someone upgrades the CMakeLists.txt, so that we can remove the Android.mk, I'm more than happy!

@yegorich
Copy link
Contributor

We already have all the instructions required for an Android build. Just tried to build against android-ndk-r26d and it works. Hence, we can also remove Android.mk.

As to the plain Makefiles on an embedded system. This is mostly possible on more or less standard distors like Debian/Ubuntu. Builroot, OpenWrt, etc. don't provide a compiler as a target package. So, in most cases you'll have to cross-compile your code.

@yegorich
Copy link
Contributor

The last patch should be called "build-system: remove Anroid.mk".

@marckleinebudde
Copy link
Member Author

Wanted to commit --amend into the 2nd patch. fixed. Thanks.

@hartkopp
Copy link
Member

As to the plain Makefiles on an embedded system. This is mostly possible on more or less standard distors like Debian/Ubuntu. Builroot, OpenWrt, etc. don't provide a compiler as a target package. So, in most cases you'll have to cross-compile your code.

Ok. I recently got a Ubuntu 14.04 (with a now unsupported cmake 2.8) on my desk and wanted to build the latest can-utils.
The entire repo is enabled to build the can-utils even on very old Linux installations today. And I really like that feature.

As you now removed 50% of the build systems (especially the ugly ones) this is already a nice cleanup.
The plain old Makefile does not seem to be hard to maintain together with CMakeLists.txt and it is a good 'learning' example. Therefore I really would like to keep the plain old Makefile together with the cmake build system.

@marckleinebudde marckleinebudde force-pushed the buildsystems-cleanup branch 4 times, most recently from 33a1c1b to e23d877 Compare May 28, 2024 07:08
@marckleinebudde marckleinebudde force-pushed the buildsystems-cleanup branch 11 times, most recently from 98580b1 to e918bd5 Compare May 28, 2024 08:33
@marckleinebudde marckleinebudde force-pushed the buildsystems-cleanup branch 9 times, most recently from c13e7fd to 196ac45 Compare May 29, 2024 12:28
Travis is not used anymore.
@marckleinebudde marckleinebudde changed the title build-systems: remove Makefile and autotools build-systems: remove autotools and Android.mk May 29, 2024
@marckleinebudde
Copy link
Member Author

marckleinebudde commented May 29, 2024

FWIW I've kept the plain old Makefile. I personally consider it obsolete. I've not added it to the new CI integration. From my point of view this PR is ready to merge.

@marckleinebudde
Copy link
Member Author

@yegorich

We already have all the instructions required for an Android build. Just tried to build against android-ndk-r26d and it works. Hence, we can also remove Android.mk.

Can you create a android CI integration?

@yegorich
Copy link
Contributor

I'll look into it. GitHub images seem to also ship NDK

@marckleinebudde
Copy link
Member Author

I'll look into it. GitHub images seem to also ship NDK

That was quick! Thanks a lot!

@marckleinebudde marckleinebudde force-pushed the buildsystems-cleanup branch 3 times, most recently from 2c76d9a to 0eb3848 Compare May 29, 2024 18:58
@marckleinebudde marckleinebudde changed the title build-systems: remove autotools and Android.mk build-systems: remove autotools and Android.mk, upgrade CI infrastructure May 29, 2024
@marckleinebudde marckleinebudde merged commit 72d097b into linux-can:master May 29, 2024
11 checks passed
@marckleinebudde marckleinebudde deleted the buildsystems-cleanup branch May 29, 2024 19:10
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

Successfully merging this pull request may close these issues.

Too many build systems
3 participants