Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 985653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:11:51+00:00 2026-05-16T05:11:51+00:00

Lately at work, I’ve been doing some translation from Makefiles to an alternative build

  • 0

Lately at work, I’ve been doing some translation from Makefiles to an alternative build system. I’ve seen some pretty hairy Make code in some places using functional map, filter, and foreach constructs. This surprised me since I think build scripts ought to be as declarative as possible.

Anyway, this got me thinking: is the Makefile language (say the latest GNU make to be specific) Turing complete?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:11:51+00:00Added an answer on May 16, 2026 at 5:11 am

    Yes, see this. Once you have lambda, it’s all downhill from there.

    Here is a plagiarized Fibonacci example

    This should be enough to build a foundation for more generality (I’ve got to get back to work, or I’d play more.)

    dec = $(patsubst .%,%,$1)
    
    not = $(if $1,,.)
    
    lteq = $(if $1,$(if $(findstring $1,$2),.,),.)
    gteq = $(if $2,$(if $(findstring $2,$1),.,),.)
    eq = $(and $(call lteq,$1,$2),$(call gteq,$1,$2))
    lt = $(and $(call lteq,$1,$2),$(call not,$(call gteq,$1,$2)))
    
    add = $1$2
    sub = $(if $(call not,$2),$1,$(call sub,$(call dec,$1),$(call dec,$2)))
    mul = $(if $(call not,$2),$2,$(call add,$1,$(call mul,$1,$(call dec,$2))))
    fibo = $(if $(call lt,$1,..),$1,$(call add,$(call fibo,$(call dec,$1)),$(call fibo,$(call sub,$1,..))))
    fact = $(if $(call lt,$1,..),.,$(call mul,$1,$(call fact,$(call dec,$1))))
    
    numeral = $(words $(subst .,. ,$1))
    
    go = $(or $(info $(call numeral,$(call mul,$1,$1)) $(call numeral,$(call fibo,$1)) $(call numeral,$(call fact,$1)) ),$(call go,.$1))
    
    _ := $(call go,)
    

    This prints out squares, fibonacci numbers and factorials. There appears to be a 16 bit limit on number sizes. Bummer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been doing some work lately on a project that makes extensive use of
I have been doing some work lately with a Pre-compiled .NET3.5 app so i
Lately i been doing some work on my MySql class in php and as
I have been doing some research lately over my work project, i am trying
We've been doing a lot of work with LINQ lately, mainly in a LINQ-to-Objects
I've been working on some jQuery widget for work/fun lately ( github ) and
Doing some work on controlling printing via the System.Printing framework (main classes are PrintQueue,
I've been doing a lot of work with Flex/Flash/Away3D lately, and have started looking
Lately, I have been doing some research into cryptography. To get a better understanding
I've been thinking a lot lately about a music-oriented project I'd like to work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.