Phone Trills… Trills… Click..
Guinness Book of World Records “Hello?”
Me “Hi – I would like to register this blog title as the worlds longest and most unnecessary title for a technical IBM-i blog ever in the world ever!!!”
Guinness Book of World Records “Idiot! Don’t ever call us again.”
Click…. Static
If you’ve spent any time developing on IBM i, especially with modern tools like VS Code for IBM i and build systems you know the pain of managing Rules.mk files.
These GNU Make-style files are the backbone of building native QSYS objects reliably. In the root of your project, Rules.mk lists top-level objects and sources. In subfolders, they declare subdirectories, override compile parameters, handle wildcards for similar file types (like all RPGLE programs), set dependency rules, fix include paths, and ensure incremental builds work without recompiling everything every time.
But in real-world projects, particularly large, migrated legacy apps with dozens (or hundreds) of folders Rules.mk files get messy fast:
- Inconsistent variable overrides (e.g., different compile options for the same object type)
- Broken wildcard patterns missing new files
- Outdated paths after refactoring
- Missing subdirectory declarations
- Dependency issues causing full rebuilds instead of smart incremental ones
- Typos or syntax errors that break the entire build
Manually hunting through every folder to fix these? That’s hours (sometimes days) of tedious, error-prone work. Every new developer on the team repeats the pain. Builds take longer. Confidence drops.
Enter IBM BOB the AI-powered development assistant that’s changing the game for IBM i developers.
The Problem: Rules.mk Chaos in Multi-Folder Projects
Typical scenario:
- You open a migrated project with nested source folders (QRPGLESRC, QDDSSRC, QCLLESRC, etc.)
- Some Rules.mk files use wildcards correctly (*.rpgle → PGM), others don’t
- Compile options vary wildly between folders
- New subdirectories were added but never declared in parent Rules.mk
- Include/copy directives still use old member-style paths instead of Unix-style
- Builds fail intermittently or force unnecessary recompiles
Fixing this manually means opening dozens of files, copy-pasting patterns, testing builds, fixing breakage, repeat.
How IBM BOB Fixes Rules.mk Automatically
Here’s the workflow that can save you massive time:
- Open your project in the IDE Use VS Code with Code for IBM i + Project Explorer, or the full Bob IDE. Ensure your project has iproj.json configured (library list, build env, etc.).
- Chat with Bob in natural language No cryptic prompts needed. Just say something like:”Scan the entire project and fix all Rules.mk files. Standardize compile options globally, ensure all subdirectories are declared in parent Rules.mk, apply consistent wildcards for RPGLE/COBOL sources, update include paths to Unix style, and make sure incremental dependencies work properly. Apply changes automatically and explain what you changed.”Bob understands the repo structure, reads every Rules.mk, detects patterns/issues, and proposes intelligent fixes.
- Watch the magic happen
- Bob analyzes folder structure and existing Rules.mk content
- Identifies inconsistencies (e.g., missing SUBDIRS += in parents, varying CRTxxx commands)
- Generates/refactors content: adds wildcard rules, overrides variables centrally, propagates changes
- Handles IBM i specifics: pseudo-source, .sqlvar extensions, trigger objects, etc.
- Applies edits across all folders in one go (with your approval per file or bulk)
- Saves everything and even runs a test build to verify
- Before vs. After Results
- Before: Fragmented Rules.mk → slow, unreliable builds
- After: Clean, consistent, self-documenting setup → faster incremental compiles, fewer errors, easier onboarding
Real example from migrated sources: Bob can auto-rename extensions, fix copy/include directives, generate missing Rules.mk entries turning a broken project into a modern, buildable one in minutes instead of days.
Final Thoughts
If you’re still babysitting Rules.mk files folder-by-folder, you’re wasting time that could be spent on actual business logic or modernization. I know I was.
IBM BOB turns this repetitive chore into a one-prompt automation! With BOB understanding IBM i quirks, applying best practices, and saving hours (or days) per project.
Whether you’re using TOBi (the open-source build system), modernizing legacy apps, or just want cleaner builds, give Bob a try. The future of IBM i development is AI-assisted and it’s already here.
Have you tried Bob on your Rules.mk headaches? Drop a comment below – what’s the worst Rules.mk mess you’ve dealt with?

