Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgw/prelude.mk
A partial port of Haskell's prelude.hs to GNU Make
https://github.com/bgw/prelude.mk
Last synced: 20 days ago
JSON representation
A partial port of Haskell's prelude.hs to GNU Make
- Host: GitHub
- URL: https://github.com/bgw/prelude.mk
- Owner: bgw
- License: wtfpl
- Created: 2013-12-07T01:18:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-07T01:19:03.000Z (almost 11 years ago)
- Last Synced: 2024-10-04T15:55:33.512Z (about 1 month ago)
- Size: 105 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`prelude.mk`
============What the hell is this?
----------------------Some of the more interesting functions in Haskell's [`prelude.hs`][plhs],
re-written in GNU make, *without shelling out or using guile*.[plhs]: http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude.html
Why?
----In theory, these functions could be used to write more advanced makefiles. In
practice, GNU make is such a restricted environment (without shelling out), that
the implementation we have to create for many of our functions is absurd.Basically, I wrote this *because I could*.
Can I use this?
---------------It's under the WTFPL, so yes.
How do I use this?
------------------Copy `prelude.mk` to your project, and put in your Makefile
```make
include prelude.mk
```Prelude's functions can be called with make's `call` function:
```make
all:
@echo $(call sum,$(call range,100))
```Should I use this?
------------------**No**. Dear god. *No*.
It would be reasonable to reimplement many of these concepts using the `shell`
function, but don't try to use this pure-make implementation.