Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

getting rid of the Makefile makes Julian a happy frenchie

  • Loading branch information...
commit df6eefe89a3431a69d76f905a216fb767e76c27c 1 parent 38b8853
@jaubourg authored
Showing with 23 additions and 52 deletions.
  1. +0 −25 Makefile
  2. +7 −16 doc/BUILD.md
  3. +16 −11 grunt.js
View
25 Makefile
@@ -1,25 +0,0 @@
-
-all: update_submodules
-
-submoduleclean: clean
- @@echo "Removing submodules"
- @@rm -rf test/qunit
-
-# change pointers for submodules and update them to what is specified in jQuery
-# --merge doesn't work when doing an initial clone, thus test if we have non-existing
-# submodules, then do an real update
-update_submodules:
- @@if [ -d .git ]; then \
- if git submodule status | grep -q -E '^-'; then \
- git submodule update --init --recursive; \
- else \
- git submodule update --init --recursive --merge; \
- fi; \
- fi;
-
-# update the submodules to the latest at the most logical branch
-pull_submodules:
- @@git submodule foreach "git pull \$$(git config remote.origin.url)"
- #@@git submodule summary
-
-.PHONY: all submoduleclean update_submodules pull_submodules
View
23 doc/BUILD.md
@@ -1,26 +1,17 @@
What you need to build your own ajaxHooks
-----------------------------------------
-In order to build ajaxHooks, you need to have GNU make 3.8 or later, Node.js/npm latest, and git 1.7 or later.
+In order to build ajaxHooks, you need to have Node.js/npm latest, and git 1.7 or later.
(Earlier versions might work OK, but are not tested.)
Windows users have two options:
-1. Install [msysgit](https://code.google.com/p/msysgit/) (Full installer for official Git),
- [GNU make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm), and a
- [binary version of Node.js](http://node-js.prcn.co.cc/). Make sure all three packages are installed to the same
- location (by default, this is C:\Program Files\Git).
-2. Install [Cygwin](http://cygwin.com/) (make sure you install the git, make, and which packages), then either follow
- the [Node.js build instructions](https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29) or install
- the [binary version of Node.js](http://node-js.prcn.co.cc/).
-
-Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from
-[Apple's Xcode site](http://developer.apple.com/technologies/xcode.html)) and
-[Homebrew](http://mxcl.github.com/homebrew/). Once Homebrew is installed, run `brew install git` to install git,
-and `brew install node` to install Node.js.
-
-Linux/BSD users should use their appropriate package managers to install make, git, and node, or build from source
-if you swing that way. Easy-peasy.
+1. Install [msysgit](https://code.google.com/p/msysgit/) (Full installer for official Git) and a [binary version of Node.js](http://node-js.prcn.co.cc/). Make sure both packages are installed to the same location (by default, this is C:\Program Files\Git).
+2. Install [Cygwin](http://cygwin.com/) (make sure you install git), then either follow the [Node.js build instructions](https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29) or install the [binary version of Node.js](http://node-js.prcn.co.cc/).
+
+Mac OS users should install [Homebrew](http://mxcl.github.com/homebrew/), then run `brew install git` to install git, and `brew install node` to install Node.js.
+
+Linux/BSD users should use their appropriate package managers to install git, and node, or build from source if you swing that way. Easy-peasy.
How to build your own ajaxHooks
View
27 grunt.js
@@ -106,25 +106,30 @@ module.exports = function( grunt ) {
});
grunt.registerTask( "submodules", function() {
- var done = this.async();
+ var done = this.async(),
+ cp = require("child_process");
grunt.verbose.write( "Updating submodules..." );
- // TODO: migrate remaining `make` to grunt tasks
- //
- grunt.utils.spawn({
- cmd: "make"
- }, function( err, result ) {
- if ( err ) {
+ cp.exec( "git submodule", function( err, stdout, stderr ) {
+ if ( err || stderr ) {
grunt.verbose.error();
- done( err );
+ done( err || stderr );
return;
}
+ var cmd = "git submodule update --init --recursive" +
+ ( /(?:^|\n)-/.test( stdout ) ? "" : " --merge" );
- grunt.log.writeln( result );
+ grunt.log.writeln( cmd );
- done();
+ cp.exec( cmd, function( err, stdout, stderr ) {
+ if ( err || stderr ) {
+ grunt.verbose.error();
+ done( err || stderr );
+ return;
+ }
+ done();
+ });
});
});
-
};
Please sign in to comment.
Something went wrong with that request. Please try again.