{"id":20875392,"url":"https://github.com/ljdursi/make_pattern_rules","last_synced_at":"2026-03-19T17:55:46.918Z","repository":{"id":84104229,"uuid":"122285748","full_name":"ljdursi/make_pattern_rules","owner":"ljdursi","description":"Tutorial for using Makefile pattern rules","archived":false,"fork":false,"pushed_at":"2018-02-25T19:28:07.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T22:42:51.585Z","etag":null,"topics":["makefile","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ljdursi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-21T02:59:07.000Z","updated_at":"2022-11-06T03:59:34.000Z","dependencies_parsed_at":"2023-07-18T15:15:38.290Z","dependency_job_id":null,"html_url":"https://github.com/ljdursi/make_pattern_rules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ljdursi/make_pattern_rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljdursi%2Fmake_pattern_rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljdursi%2Fmake_pattern_rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljdursi%2Fmake_pattern_rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljdursi%2Fmake_pattern_rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ljdursi","download_url":"https://codeload.github.com/ljdursi/make_pattern_rules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljdursi%2Fmake_pattern_rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30395150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["makefile","tutorial"],"created_at":"2024-11-18T06:44:44.833Z","updated_at":"2026-03-11T19:12:53.604Z","avatar_url":"https://github.com/ljdursi.png","language":"Makefile","readme":"# Programming Make, part I: Pattern Rules\n\n[![Build Status](https://travis-ci.org/ljdursi/make_pattern_rules.svg?branch=master)](https://travis-ci.org/ljdursi/make_pattern_rules)\n\nA short walk-through of pattern rules in Makefile, targetted at\npeople who have a little scripting experience.  Notionally, at this\npoint we have:\n\n- Introduced a motivating problem (comparing AirBnB prices in two similar-sized cities in different countries, Toronto and Chicago)\n- Talked about the reasons for wanting reproducibility/automation and Make in particular\n- Gone through the process of translating a bash script into Make in two steps (literally, then breaking out each output-file individually) and seen the advantage of incremental rebuilds; this introduces\n    - targets\n    - dependencies\n    - order dependencies\n    - SECONDARY: for keeping intermediate targets\n    - Multi-line commands; each line is run in a different shell\n- Added some canonical targets (clean and all) and introduced PHONY\n\nNow we're taking that and introducing pattern rules for DRY - maintainability and extensibility.\n\nThe worked example uses python, with seaborn and pandas, although\nno python experience is necessary; for our purposes, they are just\ncommand line tools we're running.  However, you'll have to make sure\nthe modules are installed:\n\n```\nvirtualenv make_pattern\nsource make_pattern/bin/activate\npip install -r requirements.txt\n```\n\nand make sure you have **GNU**, not BSD, Make installed; the precise version shouldn't matter:\n\n```\n$ make -v\nGNU Make 3.81\n...\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljdursi%2Fmake_pattern_rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fljdursi%2Fmake_pattern_rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljdursi%2Fmake_pattern_rules/lists"}