Link Search Menu Expand Document

Homework 06: Metaprogramming

Homework Update

Run git pull to grab the latest homework.


  1. Most makefiles provide a target called clean. This isn’t intended to produce a file called clean, but instead to clean up any files that can be re-built by make. Think of it as a way to “undo” all of the build steps. Implement a clean target for the paper.pdf we discussed in class. You will have to make the target phony. In other words, you should be deleting all the files generated by our Makefile. A number of other very common make targets are listed here.

    To get you started, we copied the files data.dat, paper.tex,, and the Makefile from lecture as Makefile_original. Copy this to Makefile and update it accordingly.

    Please upload your updated Makefile.

  2. Make your own website with Github Pages! Follow the quickstart guide to do so. Once you’re done, put the link of your Github Page in github_page, and upload this file.
  3. Git can act as a simple CI system all by itself. In .git/hooks inside any git repository, you will find (currently inactive) files that are run as scripts when a particular action happens. Write a pre-commit hook that runs make paper.pdf and refuses the commit if the make command fails. This should prevent any commit from having an unbuildable version of the paper.

    To test this, copy .git/hooks/pre-commit to pre-commit and run the tests. Submit pre-commit.

  4. Course Survey. Fill out the course survey and enter the code in survey.