mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
d76dfadc7a
fgets() is now 4x faster which makes Make 2% faster. Landlock Make now has a builtin $(uniq ...) function that uses critbit trees rather than functional programming. Since uniq is the most important function this optimization makes our cold start latency 15% faster.
20 lines
771 B
Makefile
20 lines
771 B
Makefile
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
|
#
|
|
# SYNOPSIS
|
|
#
|
|
# Cosmopolitan Functional Programming Build System
|
|
#
|
|
# OVERVIEW
|
|
#
|
|
# It's basically Blaze except a few lines of code, made possible due
|
|
# to the power and the glory of variables that're secretly lambdas.
|
|
|
|
tail = $(wordlist 2,$(words $1),$1)
|
|
reverse = $(if $1,$(call reverse,$(call tail,$1)) $(firstword $1))
|
|
uniqr = $(if $1,$(call uniqr,$(filter-out $(firstword $1),$1)) $(firstword $1))
|
|
|
|
# polyfill uniq native (landlock make 1.4)
|
|
ifneq ($(call uniq,c b c a),c b a)
|
|
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
|
endif
|