Skip to content

Instantly share code, notes, and snippets.

@saltednut
Last active January 1, 2016 19:59
Show Gist options
  • Select an option

  • Save saltednut/8193643 to your computer and use it in GitHub Desktop.

Select an option

Save saltednut/8193643 to your computer and use it in GitHub Desktop.
Demo Framework Makefile Guidelines

Order of items for each module is always consistent.

  1. Version
  2. Type
  3. Subdir
  4. Download Type
  5. Download Revision
  6. Download Branch
  7. Patches

Syntax is important!

  • Always use lowercase for array[keys]
  • Always encase array values in "quotes"

Patches:

  • Always include the issue title and link as comments.
  • Do not leave the [patch] array empty, such as [patch][]
  • Always include the issue # as your patch key, ex [patch][1234]

Example:

projects[navbar][version] = "1.x-dev"
projects[navbar][type] = "module"
projects[navbar][subdir] = "contrib"
projects[navbar][download][type] = "git"
projects[navbar][download][revision] = "dd542e1"
projects[navbar][download][branch] = "7.x-1.x"
; Menu icons for contrib modules
; http://drupal.org/node/1954912
projects[navbar][patch][1954912] = "http://drupal.org/files/navbar-contrib-icons-1954912-6.patch"

Always include a full line break between projects.

Example:

projects[translation_helpers][version] = "1.0"
projects[translation_helpers][type] = "module"
projects[translation_helpers][subdir] = "contrib"

projects[variable][version] = "2.2"
projects[variable][type] = "module"
projects[variable][subdir] = "contrib"

Projects are sorted by Feature (ie: all DF Engage modules in one place), alphabetically.

Example:

; DF Engage
projects[context_admin][version] = "1.x-dev"
projects[context_admin][type] = "module"
projects[context_admin][subdir] = "contrib"
projects[context_admin][download][type] = "git"
projects[context_admin][download][revision] = "15a8390"
projects[context_admin][download][branch] = "7.x-1.x"

projects[field_permissions][version] = "1.0-beta2"
projects[field_permissions][type] = "module"
projects[field_permissions][subdir] = "contrib"

projects[goals][version] = "1.x-dev"
projects[goals][type] = "module"
projects[goals][subdir] = "contrib"
...

Libraries and themes go at the bottom of the makefile in their own sections.

Example:

; Libraries
libraries[backbone][download][type] = "get"
libraries[backbone][download][url] = "http://documentcloud.github.io/backbone/backbone-min.js"

libraries[colorbox][download][type] = "get"
libraries[colorbox][download][url] = "https://github.com/jackmoore/colorbox/archive/master.zip"
projects[demonstratie][version] = "1.x-dev"
projects[demonstratie][type] = "theme"
projects[demonstratie][subdir] = "contrib"
projects[demonstratie][download][type] = "git"
projects[demonstratie][download][revision] = "4df568d"
projects[demonstratie][download][branch] = "7.x-1.x"

projects[ember][version] = "2.x-dev"
projects[ember][type] = "theme"
projects[ember][subdir] = "contrib"
projects[ember][download][type] = "git"
projects[ember][download][revision] = "9d92f9a"
projects[ember][download][branch] = "7.x-2.x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment