]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Replaces some @echo recipes by @printf.
authorNicolas Dudebout <nicolas.dudebout@gatech.edu>
Wed, 2 Jan 2013 10:42:59 +0000 (05:42 -0500)
committerNicolas Dudebout <nicolas.dudebout@gatech.edu>
Mon, 14 Jan 2013 13:58:16 +0000 (08:58 -0500)
The echo command does not understand the -n argument on Mac OS X.
This is due to the fact that:

  - Makefile calls /bin/sh to execute a command
  - in Mac OS X, /bin/sh is a link to bash
  - in Mac OS X, bash is compiled with --enable-strict-posix-default

Therefore, the echo command does not have the -n argument.

printf on the other hand is a builtin function that works well on Mac OS X and Linux.

Makefile

index cb776a6bf01635cdd13fa5947f3d94d23d9448ce..eb7356d7dafaec2d517c42178aa147f3512bffa6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,14 +13,14 @@ build:
        @echo "\n${HR}"
        @echo "Building Bootstrap..."
        @echo "${HR}\n"
-       @echo -n "Running JSHint on javascript..."
+       @printf "Running JSHint on javascript..."
        @jshint js/*.js --config js/.jshintrc
        @jshint js/tests/unit/*.js --config js/.jshintrc
        @echo "             ${CHECK} Done"
-       @echo -n "Compiling LESS with Recess..."
+       @printf "Compiling LESS with Recess..."
        @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
        @echo "               ${CHECK} Done"
-       @echo -n "Compiling documentation..."
+       @printf "Compiling documentation..."
        @node docs/build
        @cp fonts/* docs/assets/fonts/
        @cp js/*.js docs/assets/js/
@@ -29,7 +29,7 @@ build:
        @cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js
        @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
        @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
-       @echo -n "Compiling and minifying javascript..."
+       @printf "Compiling and minifying javascript..."
        @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js
        @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js
        @echo "       ${CHECK} Done"