all ifeq (and such) rules run when `make` reads the Makefile, not when the rule is executed. You need to think of them like a preprocessor. Once they're parsed, for the lines that don't match, everything happens as if they're not in the file.

therefore I was thinking of something like this:

```
ifeq ($(REPORTER), JSONMozPerf)
  echo '['; \
endif
  for app in ${APPS}; do \
ifeq ($(REPORTER), JSONMozPerf)
    if [ -z "$${FIRST_LOOP_ITERATION}" ]; then \
      FIRST_LOOP_ITERATION=done; \
    else \
      echo ','; \
    fi; \
endif
    FILES_PERF=`test -d apps/$$app/test/performance && find apps/$$app/test/performance -name "*_test.js" -type f`; \
    REPORTER=${REPORTER} ./tests/js/bin/runner $$app $${SHARED_PERF} $${FILES_PERF}; \
  done; \
ifeq ($(REPORTER), JSONMozPerf)
  echo ']'; \
endif
```

I personally do prefer this (if this works of course), but maybe @Rik will think otherwise ?