Skip to content

Building a Melody distribution with make

jjsanderson edited this page May 29, 2011 · 12 revisions

This guide and its commands assume that you are in the Melody home directory where scripts such as index.cgi and directories such as addons exist.

NB. This page is old. The main body may still be relevant in some circumstances, but in most cases (eg. a git clone or downloading one of the auto-created-from-tags archives on the download page) all you need do is ./build/melody/minify-static. This generates the missing css and js files, and allows the Melody admin interface to work as expected. The rest of this document may then be ignored unless you're packaging for distribution.

1.) Delete MANIFEST if one exists. The MANIFEST build process in step 3 will only append new files. It won't clear out files that have been removed or renamed. Any files missing files will result in warning messages during step 2 that could otherwise be ignored.

2.) perl Makefile.PL

Creates the Makefile necessary for the rest of the build. This process will check that all files in the MANIFEST are included if one is present. You should have one though if you followed step 1.

  1. make manifest

Creates the MANIFEST file according to what it finds in your current working directory excluding files according to the patterns found MANIFEST.SKIP.

4.) make

Does the preprocessing of your code for the rest of the process. The make system will do this if you haven't done it and attempt to run another command. Its better to do this as a separate command before running what follows. Error are more apparent and easier to spot.

5.) make test

This runs the entire test suite according to the test_manifest file. This is technically optional for a distribution build, but a good idea.

6a.) make tardist

This creates a tar.gz archive based on the defined application name and version number inside of MT.pm. Note that 'make dist does the same thing by default unless specified differently.

6b.) make zipdist

This creates a zip archive based on the defined application name and version number inside of MT.pm.

If all has gone well you can tell make to clean up the temporary files it created to create the distribution packages.

7.) make realclean

This command will remove all the files make knows it created except for Occasionally units tests will create files incorrectly and make realclean will miss them. You can manually remove these for now. Eventually the test creating them should be fixed or an extension be added to the realclean routine.

Not yet implemented

  • The ability to minify CSS and Javascript which the app expects and uses when DebugMode is NOT in effect.
  • The ability to specify whether the build should be a developer build or a production build
  • The ability to leverage the contents of .gitignore and .git/info/exclude in addition to or in place of MANIFEST.skip when creating the MANIFEST
  • The ability to automatically push a distribution to GitHub using the GitHub API
  • A mode that harnesses/utilizes the power of git archive (maybe all dist modes should)
Clone this wiki locally