flex: [Bug] Makefile error: Need an operator

Composer version 1.4.2 2017-05-17 08:17:52 PHP 7.1.3 FreeBSD 10.3

composer create-project "symfony/skeleton:^3.3" demo

Installing symfony/skeleton (v3.3.2)
  - Installing symfony/skeleton (v3.3.2): Loading from cache
Created project in demo
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 22 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.0.7): Loading from cache
  - Installing symfony/stopwatch (v3.3.2): Loading from cache
  - Installing symfony/routing (v3.3.2): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.4.0): Loading from cache
  - Installing psr/log (1.0.2): Loading from cache
  - Installing symfony/debug (v3.3.2): Loading from cache
  - Installing symfony/http-foundation (v3.3.2): Loading from cache
  - Installing symfony/event-dispatcher (v3.3.2): Loading from cache
  - Installing symfony/http-kernel (v3.3.2): Loading from cache
  - Installing symfony/finder (v3.3.2): Loading from cache
  - Installing symfony/filesystem (v3.3.2): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/dependency-injection (v3.3.2): Loading from cache
  - Installing symfony/config (v3.3.2): Loading from cache
  - Installing symfony/class-loader (v3.3.2): Loading from cache
  - Installing psr/simple-cache (1.0.0): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Installing symfony/cache (v3.3.2): Loading from cache
  - Installing doctrine/cache (v1.6.1): Loading from cache
  - Installing symfony/framework-bundle (v3.3.2): Loading from cache
  - Installing symfony/yaml (v3.3.2): Loading from cache
  - Installing symfony/dotenv (v3.3.2): Loading from cache
Writing lock file
Generating autoload files
Symfony operations: 2 recipes
  - Configuring symfony/flex (1.0): From github.com/symfony/recipes:master
  - Configuring symfony/framework-bundle (3.3): From github.com/symfony/recipes:master
Executing script make cache-warmup [KO]
 [KO]
Script make cache-warmup returned with error code 1
!!  make: "/home/gander/demo/Makefile" line 1: Need an operator
!!  make: "/home/gander/demo/Makefile" line 3: Need an operator
!!  make: Fatal errors encountered -- cannot continue
!!  
!!  make: stopped in /home/gander/demo
!!  
!!  

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Closing as Makefiles are gone. symfony/console is now a requirement in the base skeleton.

The makefile doesn’t work on Windows either, unless you use WSL or Cygwin. I’m starting to think that the makefile wasn’t a nice solution for every developer, just because of the windows problem (and there is still a lot of people using windows). It’s another subject, but I wonder if we should open an issue for Windows too 😕

@Pierstoval I prefer simple POSIX compatible shell script (it works with busybox - only 414 KB exe file for windows):

#!/bin/sh
set -e

###> symfony/framework-bundle ###
cmd_serve_as_php() { ## Run application
    printf "\033[32;49mServer listening on http://127.0.0.1:8000\033[39m\n"
    php -S 127.0.0.1:8000 -t web
}
###< symfony/framework-bundle ###

# Simple Shell Task Runner
_header(){
    printf "Application \033[1;33m%s\033[0m: usage %s [command]\n\n" "app" "$0"
}

_commands(){
    printf "\033[33mCommands:\033[0m\n"
    PATTERN="^\s*cmd_([a-zA-Z_-]+)\s*\(\s*\)[ \{]*"
    grep -E "$PATTERN" < "$0" | sort | sed -r -e "s/$PATTERN/\1/" | awk 'BEGIN {FS = "##[ \t]*"}; {printf "  \033[36m%-15s\033[0m %s\n", $1, $2}'
}

if [ "$1" = '' ] || [ "$1" = '-h' ] || [ "$1" = '--help' ]; then
    _header
    _commands
elif command -v "cmd_${1}" > /dev/null; then
    command=$1 && shift && cmd_"${command}" "$@"
else
    _header
    printf "\033[30;41mCommand \"%s\" doesn't exist.\033[0m\n\n" "$1" >&2 && _commands >&1 && exit 1
fi

Hello to install flex over windows without problems, you must to install first these packages

http://gnuwin32.sourceforge.net/packages/coreutils.htm http://gnuwin32.sourceforge.net/packages/make.htm

after SET in your windows enviromental vars something like “C:\Program Files (x86)\GnuWin32\bin” where this is your path of GnuWin bin directory

Error was “Command not found” since “make” is not more included in the git-windows-mingw.

Tried the Mingw way as already installed with git fow windows. Unfortunately make is no longer integrated. Installed Mingw and got it fly.

I think, the windows problem should not be ignored. In my work i stuck in windows7, so no WSL available. Also deployment on (older) Windows Server (with IIS) could be a mess.