Skip to content

Commit

Permalink
Moved installation files to outside the install directory.
Browse files Browse the repository at this point in the history
The install directory is still bin/ but the other files such as configs
are now in files. When 'make install' these files are copied to bin/

bin/ in now ignored by git
  • Loading branch information
joehillen committed Feb 28, 2011
1 parent 045711e commit 6b9e5ae
Show file tree
Hide file tree
Showing 152 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -6,7 +6,7 @@ Thumbs.db
# Default test map
src/testmap

bin/.gitignore
bin/

# CMake generated files
CMakeCache.txt
Expand Down
9 changes: 6 additions & 3 deletions Makefile
@@ -1,11 +1,14 @@
SUBDIRS = src plugins
SUBDIRS = src plugins files

include subdir.mk

dist-tar:
dist-tar: LICENSE
tar cvzf mineserver-latest-`uname`-bin.tar.gz ./bin/ ./LICENSE

dist-zip:
dist-zip: LICENSE
zip -j mineserver-latest-`uname`-bin.zip ./bin/* ./LICENSE

dist: dist-tar dist-zip

clean:
rm -rf ./bin

This comment has been minimized.

Copy link
@winex

winex Mar 1, 2011

Contributor

holy crap!
but what about ./bin/world/ (!!!) and other useful stuff????????

This comment has been minimized.

Copy link
@joehillen

joehillen Mar 1, 2011

Author Contributor

Back those up before running make clean. You shouldn't be running a live/persistent server in your working src directory.

This comment has been minimized.

Copy link
@winex

winex Mar 1, 2011

Contributor

who says about persistent?
everything that were 'make install' -ed should be removed, yep... but ONLY that and no more!
well, unless it works this way :P

oh, forgot to mention, that clean target were never intended to UNINSTALL!!!

This comment has been minimized.

Copy link
@joehillen

joehillen Mar 1, 2011

Author Contributor

Should is the important word. The way the makefiles are currently written not all the files are tracked during build. It just finds *.cpp files and then builds and installs them. The opposite is to maintain a list of all the files to build, which I am not opposed to and have done in other projects, but it is tedious for large projects because every file has to be manually added and removed from the build system.

make clean != make uninstall The standard use case is to start everything fresh. If you are worried about saving old world files between cleans then do cp bin/ /opt/mineserver or whatever after each install.

Honestly, the current setup isn't even right. For most projects, make install should move everything to somewhere like /usr/local/mineserver while make all should build and move everything to bin/, but this was what was here.

This comment has been minimized.

Copy link
@winex

winex Mar 1, 2011

Contributor

yep, that's why i added #136 and working on that...

hmm, cp bin/ /opt/mineserver -- i smell sitting-under-root user here, nope? :P
and to be more precise, make install PREFIX=/whatever/path should install there, as we do for ./configure

i was thinking of copying stuff after build, like auto-install locally, but i'm not sure.
assuming you've already moved files/ up, it might be easier just to use that dir from source, but it depends where ppl want ./mineserver executable to be located

This comment has been minimized.

Copy link
@joehillen

joehillen Mar 1, 2011

Author Contributor

How about this? I changed clean to distclean. That way clean still works the same way it used to and there is still a "start fresh" command. Compromise.

joehillen@b7db51a

This comment has been minimized.

Copy link
@winex

winex Mar 1, 2011

Contributor

yeah, that's better.
but what about using only cmake-generated Makefiles as stated in #136 ? vote plz if you agree
or do you have any problems with cmake?

This comment has been minimized.

Copy link
@joehillen

joehillen Mar 1, 2011

Author Contributor

My only issue with CMake is that I have never used it and the current setup seems to work fine. I have heard great things about it though, so it would be worth a shot.

If you want to build and maintain a CMake build system, then go ahead.

This comment has been minimized.

Copy link
@winex

winex Mar 1, 2011

Contributor

definitely :)
but it's not that easy to write as .pro fles for qmake
adding few things to properly written CMakeLists.txt is easy, though.

you can always check my progress here: https://github.com/winex/mineserver

20 changes: 20 additions & 0 deletions files/Makefile
@@ -0,0 +1,20 @@
FILES = commands.cfg \
config.cfg \
item_alias.cfg \
banned.txt \
motd.txt \
permissions.txt \
roles.txt \
rules.txt \
whitelist.txt \

DIRS = recipes

INSTALL_DIR = ../bin/

.PHONY: clean all install

install: $(FILES)
mkdir -p $(INSTALL_DIR)
cp $(FILES) $(INSTALL_DIR)
cp -r $(DIRS) $(INSTALL_DIR)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion plugins/plugins.mk
Expand Up @@ -4,7 +4,8 @@ OBJS = $(SRCS:.cpp=.o)

all: $(OBJS) $(PLUGIN_NAME).so

install:
install: $(OBJS) $(PLUGIN_NAME).so
mkdir -p ../../bin/
cp $(PLUGIN_NAME).so ../../bin/$(PLUGIN_NAME).so

$(OBJS):
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Expand Up @@ -42,7 +42,8 @@ all: mineserver
mineserver: $(OBJS)
$(CXX) $(CXXFLAGS) $(BUILDFLAGS) $(ARCHFLAGS) $(LDFLAGS) $(OBJS) $(LIBRARIES) -o $@

install:
install: mineserver
mkdir -p ../bin/
cp mineserver ../bin

clean:
Expand Down

0 comments on commit 6b9e5ae

Please sign in to comment.