Projeto-Pindorama / heirloom-ng

A collection of standard Unix utilities that is intended to provide maximum compatibility with traditional Unix while incorporating additional features necessary today.
http://heirloom-ng.pindorama.dob.jp
Other
24 stars 7 forks source link

build/mk.config: Don't hardcode CC #12

Closed tch69 closed 1 year ago

takusuman commented 1 year ago

That's good, but I think we also could not hardcode ROOT --- I'll do it in my next commit (or, better yet, when I got a time off). ROOT is like DESTDIR, for reference.

tch69 commented 1 year ago

That's good, but I think we also could not hardcode ROOT --- I'll do it in my next commit (or, better yet, when I got a time off). ROOT is like DESTDIR, for reference.

IMO the whole Makefile needs to be rewritten. But it'll take a while to do so.

One more thing that should really be done is implementing a 'make uninstall' command. But it'll take a while too.

takusuman commented 1 year ago

That's good, but I think we also could not hardcode ROOT --- I'll do it in my next commit (or, better yet, when I got a time off). ROOT is like DESTDIR, for reference.

IMO the whole Makefile needs to be rewritten. But it'll take a while to do so.

In fact, the entire build system is kind of broken, but its "brokeness" ends up helping. Example: when it tries to create hard links between programs listed in the SKIPDIR list, it fails, because these programs had it compilation skipped, so the final file system is clean.

One more thing that should really be done is implementing a 'make uninstall' command. But it'll take a while too.

Yeah, it in fact would be useful, but it's kind of difficult to implement. Besides that, it still being worthy, since it would be more convenient than installing the files to a temporary directory, making a "map" of them with find and then removing everything with xargs and rm.

tch69 commented 1 year ago

The easiest way to do that is to implement something similar to the macros you see on *BSD (and of course, with a uninstall command).

@Duncaen had rewritten some of the macros to work with GNU make so he could use them for his OpenBSD coreutils port (I bet you already knew about it.). I think you'll find it helpful.

takusuman commented 1 year ago

The easiest way to do that is to implement something similar to the macros you see on *BSD (and of course, with a uninstall command).

@Duncaen had rewritten some of the macros to work with GNU make so he could use them for his OpenBSD coreutils port (I bet you already knew about it.). I think you'll find it helpful.

I know a little about the lobase project, because it was used in Copacabana before we started to fix Heirloom, but I don't know a lot about its build system neither about Makefiles themselves.

tch69 commented 1 year ago

Don't worry. The lobase's build system still looks fairly simple. You'll understand it soon