Automatically Testing a Distribution

The rule for building the archive directory is probably the most frustrating rule in this makefile, because it contains commands to copy individual files into the distribution directory. Every time we change the file structure in our project, we have to update this rule in our top-level makefile, or we'll break the dist target. But there's nothing more we can do—we've made the rule as simple as possible. Now we just have to remember to manage this process properly.

Unfortunately though, breaking the dist target is not the worst thing that could happen if you forget to update the distdir rule's commands. It may appear that the dist target is working, but it may not actually be copying all of the required files ...

Get Autotools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.