[{"data":1,"prerenderedAt":278},["ShallowReactive",2],{"post-\u002Fblog\u002Fmake":3},{"id":4,"title":5,"body":6,"date":269,"description":270,"extension":271,"meta":272,"navigation":63,"path":273,"seo":274,"sitemap":275,"stem":276,"__hash__":277},"blog\u002Fblog\u002Fmake.md","Makefiles: Stop Typing for Nothing",{"type":7,"value":8,"toc":263},"minimark",[9,13,16,22,27,35,94,101,105,108,170,174,217,233,236,240,243,256,259],[10,11,12],"p",{},"Typing the same long-ass commands into your terminal every five minutes is a special kind of masochism. You aren't paid by the keystroke, so stop acting like it.",[10,14,15],{},"Makefile has been around since 1976. It’s older than your favorite \"game-changing\" framework and it still does the job better than most of them.",[17,18,19],"blockquote",{},[10,20,21],{},"\"If it’s stupid but it works, it ain't stupid. But if it’s manual and repetitive, it’s definitely fucking stupid.\"\n— Every Dev Ever",[23,24,26],"h3",{"id":25},"the-magic","The Magic",[10,28,29,30,34],{},"You don't need a complex CI\u002FCD pipeline to run a few scripts. You just need a file named ",[31,32,33],"code",{},"Makefile"," and a dream.",[36,37,42],"pre",{"className":38,"code":39,"language":40,"meta":41,"style":41},"language-makefile shiki shiki-themes github-light github-dark","build:\n    docker build -t my-app .\n\nrun:\n    docker run -p 8080:8080 my-app\n\nclean:\n    docker system prune -f\n\n","makefile","",[31,43,44,52,58,65,71,77,82,88],{"__ignoreMap":41},[45,46,49],"span",{"class":47,"line":48},"line",1,[45,50,51],{},"build:\n",[45,53,55],{"class":47,"line":54},2,[45,56,57],{},"    docker build -t my-app .\n",[45,59,61],{"class":47,"line":60},3,[45,62,64],{"emptyLinePlaceholder":63},true,"\n",[45,66,68],{"class":47,"line":67},4,[45,69,70],{},"run:\n",[45,72,74],{"class":47,"line":73},5,[45,75,76],{},"    docker run -p 8080:8080 my-app\n",[45,78,80],{"class":47,"line":79},6,[45,81,64],{"emptyLinePlaceholder":63},[45,83,85],{"class":47,"line":84},7,[45,86,87],{},"clean:\n",[45,89,91],{"class":47,"line":90},8,[45,92,93],{},"    docker system prune -f\n",[10,95,96,97,100],{},"Now, instead of remembering flags, you just type ",[31,98,99],{},"make build",".",[23,102,104],{"id":103},"scaling-up","Scaling Up",[10,106,107],{},"You can use variables and shell commands inside your Makefile to handle the heavy lifting. Instead of hardcoding paths, let the script find them.",[36,109,111],{"className":38,"code":110,"language":40,"meta":41,"style":41},"# Variables are your friends\nSWIFT_FILES = $(shell find . -name \"*.swift\")\nBUNDLE_ID = com.example.App\n\n# Automate the boring stuff (like Plist generation)\napp: build\n    @echo \"Creating app bundle...\"\n    mkdir -p MyApp.app\u002FContents\u002FMacOS\n    cp $(EXECUTABLE) MyApp.app\u002FContents\u002FMacOS\u002F\n    @echo '\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>' > MyApp.app\u002FContents\u002FInfo.plist\n    @echo '\u003Cdict>\u003Ckey>CFBundleIdentifier\u003C\u002Fkey>\u003Cstring>$(BUNDLE_ID)\u003C\u002Fstring>\u003C\u002Fdict>' >> MyApp.app\u002FContents\u002FInfo.plist\n",[31,112,113,118,123,128,132,137,142,147,152,158,164],{"__ignoreMap":41},[45,114,115],{"class":47,"line":48},[45,116,117],{},"# Variables are your friends\n",[45,119,120],{"class":47,"line":54},[45,121,122],{},"SWIFT_FILES = $(shell find . -name \"*.swift\")\n",[45,124,125],{"class":47,"line":60},[45,126,127],{},"BUNDLE_ID = com.example.App\n",[45,129,130],{"class":47,"line":67},[45,131,64],{"emptyLinePlaceholder":63},[45,133,134],{"class":47,"line":73},[45,135,136],{},"# Automate the boring stuff (like Plist generation)\n",[45,138,139],{"class":47,"line":79},[45,140,141],{},"app: build\n",[45,143,144],{"class":47,"line":84},[45,145,146],{},"    @echo \"Creating app bundle...\"\n",[45,148,149],{"class":47,"line":90},[45,150,151],{},"    mkdir -p MyApp.app\u002FContents\u002FMacOS\n",[45,153,155],{"class":47,"line":154},9,[45,156,157],{},"    cp $(EXECUTABLE) MyApp.app\u002FContents\u002FMacOS\u002F\n",[45,159,161],{"class":47,"line":160},10,[45,162,163],{},"    @echo '\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>' > MyApp.app\u002FContents\u002FInfo.plist\n",[45,165,167],{"class":47,"line":166},11,[45,168,169],{},"    @echo '\u003Cdict>\u003Ckey>CFBundleIdentifier\u003C\u002Fkey>\u003Cstring>$(BUNDLE_ID)\u003C\u002Fstring>\u003C\u002Fdict>' >> MyApp.app\u002FContents\u002FInfo.plist\n",[23,171,173],{"id":172},"why-this-wins","Why this wins",[175,176,177,189,207],"ul",{},[178,179,180,184,185,188],"li",{},[181,182,183],"strong",{},"Variables:"," Change your ",[31,186,187],{},"BUNDLE_ID"," once, and it updates everywhere.",[178,190,191,194,195,198,199,202,203,206],{},[181,192,193],{},"Phony Targets:"," Use ",[31,196,197],{},".PHONY"," to tell Make that ",[31,200,201],{},"clean"," or ",[31,204,205],{},"run"," aren't actual files, avoiding weird conflicts.",[178,208,209,212,213,216],{},[181,210,211],{},"Cleanup:"," A single ",[31,214,215],{},"make clean"," that actually kills processes and wipes caches beats manual hunting every time.",[218,219,220,223,226],"ol",{},[178,221,222],{},"Define your environment variables.",[178,224,225],{},"Automate the scaffolding (folders, plists, configs).",[178,227,228,229,232],{},"Chain your commands (e.g., ",[31,230,231],{},"dev: clean app",").",[10,234,235],{},"Stop fighting your tools and start making them work for you.",[23,237,239],{"id":238},"why-it-stays","Why it stays",[10,241,242],{},"It’s language-agnostic. Whether you’re pushing Go code, compiling C, or just trying to manage a messy React project, Make doesn't care. It checks timestamps: if the file hasn't changed, it doesn't waste time rebuilding.",[218,244,245,250,253],{},[178,246,247,248,100],{},"Create a ",[31,249,33],{},[178,251,252],{},"Map your long commands to short aliases.",[178,254,255],{},"Get back to actual work.",[10,257,258],{},"Don't over-engineer your workflow when a 50-year-old tool solves it in two minutes.",[260,261,262],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":41,"searchDepth":54,"depth":54,"links":264},[265,266,267,268],{"id":25,"depth":60,"text":26},{"id":103,"depth":60,"text":104},{"id":172,"depth":60,"text":173},{"id":238,"depth":60,"text":239},"2025-12-18","Automate your commands, save your fingers.","md",{},"\u002Fblog\u002Fmake",{"title":5,"description":270},{"loc":273},"blog\u002Fmake","auhZw510n5u-Pp-V3kklnkJac5DzxCAb971g4NjqvZY",1783186628091]