this post was submitted on 07 Apr 2024
86 points (100.0% liked)

Technology

67338 readers
3710 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
 

Crossposted from [email protected]

top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 32 points 11 months ago (2 children)

converting an autotools build recipe

Oh yes!

to a bare makefile

Oh no!

[–] [email protected] 10 points 11 months ago* (last edited 11 months ago) (2 children)

Honestly, if the makefile is well written, I will take that any day. Good makefiles are 😙👌.

They are extremely rare, tho...

I guess the solution would be a declarative language that compiles to makefiles. So that people don't have to know the nitty gritty of writing good makefiles, and can just maintain a file of their dependencies and settings...

[–] [email protected] 4 points 11 months ago (2 children)

I've always conjectured that good Makefiles existed but never seen one (or only for tiny projects). The core semantic of Makefiles is clear and straight to the point, I think the issue is in all the magic that was added to that to spare a few lines.

[–] [email protected] 2 points 11 months ago

Perl? I had fun compiling perl from source back in the day.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago)

IMHO the issue is two folds:

  1. The makefile were never supposed to do more than determine which build tools to call (and how) for a given target. Meaning that in very many cases, makefile are abused to do way too much. I'd argue that you should try to keep your make targets only one line long. Anything bigger and you're likely doing it wrong (and ought to move it in a shell script, that gets called from the makefile).
  2. It is really challenging to write portable makefiles. There's BSD make and GNU make, and then there are different tools on different systems. Different dependencies. Different libs. Etc. Not easy.
[–] [email protected] 1 points 11 months ago (1 children)

Why compile to a Makefile? You'd end up with automake gunk all over again. Just use cmake or so, where the declarative language replaces the Makefile entirely

[–] [email protected] 7 points 11 months ago (1 children)

cmake compiles to makefiles as well (it just also supports some other backends). I'm not sure why that matters though. In both cases the makefile is generated.

[–] [email protected] 1 points 11 months ago

It does? I guess I never looked inside that build directory.

[–] [email protected] 3 points 11 months ago* (last edited 11 months ago)

I prefer justfiles these days.

[–] [email protected] 6 points 11 months ago

Hey Torquemada, whaddya say?

I just got back from the auto-de-fe

Auto-de-fe? What's an auto-de-fe?

It's what you oughtn't to do but you do anyway....