Drush Make and Profiler - a brief overview

Most coders are familiar with Drush Make. So I'll skip that part for now. Suffice to say that a .make file is a list of projects, modules, features and even profiles that will be fetched and installed when you use the drush make yourMakefile.make pathToDir command.

Basic makefile


Note that recursion is supported. In short, a project can itself contain a makefile.

Another neat trick is the possibility to generate a makefile for an existing website with the command drush make-generate. Although the output isn't perfect (i.e. [type] and [url] for custom modules & themes need to be filled manually), this is a great way to get an overview of the makings of a Drupal installation.

As for Profiler it facilitates the creation of installation profiles by making it possible to use the .info syntax to enable modules, set variables (e.g. site name), create users and nodes when you initialize a Drupal installation. All this without having to write a single line of php. That's great news for non-coders and coders alike.

Basic distro info file


An installtion profile consists of 3 files and an overarching makefile. For a profile named news7, the 3 files are: news7.info, news7.make and news7.profile. The .profile file will at least contain the php snippet that allows Profiler to do its magic. You can also add code that will perform additional tricks at install time.

Basic distro make file


The overarching or parent makefile of the installation profile follows.

Overarching makefile


What's the difference between a distribution and a profile you ask?

According to dmitrig01, the author of Drush Make, and as far I understand it, an install profile is JUST THE CODE that runs on the initial installation of Drupal that, for example, enables modules and sets a theme. Where as a distribution is the installation profile plus the required modules.

Another point worth noting, as of Drupalcon Chicago or (drush_make 4.2 I believe), Drush Make will install all modules in site/all/modules. When using Profiler, all projects listed in the profile's makefile will be downloaded to the profiles directory. There is an interesting discussion about the pros and cons of using these locations and for what purpose. Definitely worth the read.

Wrapping up, here are a fews links and references. Hope this helps. Also, feel free to comment and/or correct errors and misconceptions. This is still all very new to me.

Links and references

Kudos to dmitrig01 and q0rban for writing Drush Make and Profiler!

Submitted by Abrielle (not verified) on Tue, 11/01/2011 - 04:01


this is really a great one thanks for sharing...


Submitted by Richard Sheppard (not verified) on Wed, 05/23/2012 - 07:52


I've seen quite a few, and *nearly* understood what I needed, but I hadn't fully grokked how it all worked together until reading this blog post. And, you used far fewer words to do so - clear and succinct. Thank you!

All the best,

aka siliconmeadow on d.o