Jump to content

Modified Makefiles For Mac Os X


Recommended Posts

ok, I am not sure what I did wrong, but when I ran "make CONFIG=Release clean", it started trying to delete everything on my computer! I canceled the process, and don't think anything is gone, but I am really really confused as to what the hell just happened.

any ideas?

Link to comment
Share on other sites

but it should only do that if I were in the root directory. I was in the gcc directory, like the instructions said.

also, the commands for leopard, are those for snow leopard as well?

EDIT:

when I try to compile, i get this error message

Pearce-Michals-MacBook-Pro:gcc pearcemichal$ make config=release
==== Building mocks_real ====
mocks_real.cpp
/bin/sh: ”g++-mp-4.5: command not found
make[1]: *** [obj/mocks_real_Debug/mocks_real.o] Error 127
make: *** [mocks_real] Error 2
Pearce-Michals-MacBook-Pro:gcc pearcemichal$

Edited by theShadow
Link to comment
Share on other sites

I also experienced "make" try to delete files under the root when I made a typo like "make CONFIG=Relese clean". It's not my fault. It had occurred before I modified makefiles. Perhaps the makefiles which Premake generated is not so gentle for user's mistake.

BTW, Snow Leopard users don't need to use gcc-4.5. TheShadow's error message tells gcc-4.5 is not installed. You don't need the commands (export CC=...) just after update-workspaces.sh.

P.S. You don't need make "CONFIG=Release clean" if you installed the source code the first time.

Edited by mtkaz
Link to comment
Share on other sites

ok, i figured.

also, as it turns out, it DID delete stuff. all of my files are intact, but almost all of my applications are gone. I am working on replacing them now. what's odd is, it deleted the application, but the application data is still intact (like when I reinstalled chrome web browser, all of my bookmarks were still there.)

Link to comment
Share on other sites

ok, i figured.

also, as it turns out, it DID delete stuff. all of my files are intact, but almost all of my applications are gone. I am working on replacing them now. what's odd is, it deleted the application, but the application data is still intact (like when I reinstalled chrome web browser, all of my bookmarks were still there.)

I don't know anything about how Mac does things, but perhaps it works like Windows (and afaik Linux as well for the most part) and installs the application data in another place than the applicatoin itself?

Link to comment
Share on other sites

The role of each Library directories is very clear. But it's nothing to do with this matter. The problem is Premake or Premake script. "clean" section of makefile which Premake generated is:

-@rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)

If you misspelled the words, CONFIG or Release, the variables aren' set. They must be null. In this case clean section become:

rm -rf /

This command means deleting all files on your system. 'rm' command try to delete files by alphabetical order. So /Applications becomes the first victim. File permission allowed, it delete the file.It's dangerous. I think this doesn't depend on OS X.

Link to comment
Share on other sites

ok, thank you for adding that warning to the directions.

also, when you do this, just be aware of what the terminal is doing. If it starts doing things in a place it should not belong, then something is wrong, and you should kill the application.

btw, as of this moment I am pretty much back on my feet in terms od applications.

Link to comment
Share on other sites

Ah thanks for the info mtkaz.

Just to save others the search:

/System/Library is the location for the core parts of the operating system needed by your Mac to function.

/Library is the location for the parts of the operating system that apply to ALL users and applications running on the Mac like fonts and system wide application preferences.

/Users//Library is the location for all the user specific parts of the operating system like preferences, favorites, recent items, etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...