FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Silence the makefile recipes
How-ToProgramming Languages

Silence the makefile recipes

via Dev.toNaveen2h ago

Makefile is made up of recipes. Running a recipe in make, prints the recipe and also the output of every command in the recipe. Recipe can be implemented by re-directing the output to /dev/null device. But this approach has a problem. Sometimes, I wanted to read the output of the command and not be re-directed to /dev/null , especially during troubleshooting. In this situation, there is no other way but to change implementation of recipe to remove the redirection. Makefile has a switch -s to silence the printing of the recipe during execution. I wanted to use this switch to decide for redirection. ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) .REDIRECT = > /dev/null 2>&1 else .REDIRECT = endif test : which scala $( .REDIRECT ) || printf "scala is not present." Now, make test prints the recipe and output of the which command. But make test -s completely silences the recipe execution. Makefile provides a way to silence the echoing of recipes but the implementation of recipe, as

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

“Learn to Code” Is Dead… Learn to Think Instead
How-To

“Learn to Code” Is Dead… Learn to Think Instead

Medium Programming • 19m ago

How-To

How One File Makes Claude Code Actually Follow Your Instructions

Medium Programming • 30m ago

LeetCode Solution: 121. Best Time to Buy and Sell Stock
How-To

LeetCode Solution: 121. Best Time to Buy and Sell Stock

Dev.to Tutorial • 41m ago

The Feature Took 2 Hours to Build — and 2 Weeks to Fix
How-To

The Feature Took 2 Hours to Build — and 2 Weeks to Fix

Medium Programming • 1h ago

Blog 15: SDLC Phase 4 — Testing
How-To

Blog 15: SDLC Phase 4 — Testing

Medium Programming • 2h ago

Discover More Articles