Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8133507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:37:32+00:00 2026-06-06T09:37:32+00:00

For an iPad application I need to transform some CoffeeScript files into JavaScript files

  • 0

For an iPad application I need to transform some CoffeeScript files into JavaScript files before bundling them with the application.

I tried to add a Makefile to my XCode project with the following code:

MANUAL_ROOT=IOS12BSH/manual
SCRIPTS_ROOT=$(MANUAL_ROOT)/scripts

COFFEE_SOURCES=$(SCRIPTS_ROOT)/*.coffee $(SCRIPTS_ROOT)/guides/*.coffee
JAVASCRIPT_TARGETS=$(COFFEE_SOURCES:.coffee=.js)

all: build

build: coffeescript

clean: clean_coffeescript

coffeescript: $(JAVASCRIPT_TARGETS)

clean_coffeescript:
    rm -f $(JAVASCRIPT_TARGETS)

$(JAVASCRIPT_TARGETS): $(COFFEE_SOURCES)
    coffee -c $(COFFEE_SOURCES)

Running this Makefile from the shell works without problems. However, after I added the Makefile as a target in XCode, I ran into problems.

The following error was produced by the Makefile:

coffee -c IOS12BSH/manual/scripts/*.coffee IOS12BSH/manual/scripts/guides/*.coffee
/bin/sh: coffee: command not found
make: *** [IOS12BSH/manual/scripts/*.js] Error 127
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2

That is strange, as the coffee command is installed on my machine (it is installed under /opt/local/bin/coffee and /opt/local/bin is added to my $PATH in ~/.profile).

So I added an echo $(PATH) to my Makefile and it seems that the $PATH is different, when the Makefile is executed by XCode. XCode does not seem to read the settings from ~/.profile and therefore /opt/local/bin is not in $PATH.

What is the reason for this and how can I fix this, so that the coffee command is found?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:37:33+00:00Added an answer on June 6, 2026 at 9:37 am

    Well, it seems that programs started via the Dock or Spotlight do not execute .profile and therefore $PATH is not set correctly.

    So one way would be to set the $PATH in ~/.MacOSX/environments.plist. That works then apparently, but you will need a restart before it works.

    Another way is to start XCode always from the command line with open projectfile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an iPad application and need some help from you guys.
I am making my first iPad application, and I need to add the functionality
I am working on an application for iPad. This application has some PDF files
I am developing an iPad application in which I need a table view (
I have created an IPAD application which supports on Portrait orientation. Before uploading on
In my iPad application i need to implement a navigation controller behavior to the
I was implementing an iPad application. For this I need to customize the UIImagePickerController,
We have recently developed an iPad application and now need to start demonstrating it
I am working on an iPad application. In this I have to show some
I have some image files in server. I need to move or transfer the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.