Build system improvements.

Add missing -f so that ln doesn't complain about target existing.
Be sure that the toplevel makefile is silent instead of custom @'s.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Pierre Habouzit 2008-07-01 21:19:09 +02:00 committed by Julien Danjou
parent b9e8307f60
commit 49466fa385
2 changed files with 19 additions and 12 deletions

View File

@ -247,7 +247,7 @@ if(GENERATE_LUADOC)
file(MAKE_DIRECTORY ${BUILD_DIR}/lib) file(MAKE_DIRECTORY ${BUILD_DIR}/lib)
# setup symlink so everything is in one directory # setup symlink so everything is in one directory
foreach(lua_file ${AWE_LUA_FILES}) foreach(lua_file ${AWE_LUA_FILES})
execute_process(COMMAND ${LN_EXECUTABLE} -s ${lua_file} execute_process(COMMAND ${LN_EXECUTABLE} -s -f ${lua_file}
WORKING_DIRECTORY ${BUILD_DIR}/lib) WORKING_DIRECTORY ${BUILD_DIR}/lib)
endforeach() endforeach()
endif() endif()

View File

@ -1,24 +1,31 @@
builddir=.build-$(shell hostname)-$(shell gcc -dumpmachine)-$(shell gcc -dumpversion) builddir=.build-$(shell hostname)-$(shell gcc -dumpmachine)-$(shell gcc -dumpversion)
ifeq (,$(VERBOSE))
MAKEFLAGS:=$(MAKEFLAGS)s
ECHO=echo
else
ECHO=@:
endif
all: cmake all: cmake
@echo "Building…" $(ECHO) "Building…"
make -C build $(MAKE) -C build
install: cmake install: cmake
@echo "Installing…" $(ECHO) "Installing…"
make -C build install $(MAKE) -C build install
cmake: build/cmake-stamp cmake: build/cmake-stamp
build/cmake-stamp: build CMakeLists.txt awesomeConfig.cmake build/cmake-stamp: build CMakeLists.txt awesomeConfig.cmake
@echo "Running cmake…" $(ECHO) "Running cmake…"
cd ${builddir} && cmake "$@" .. cd ${builddir} && cmake "$@" ..
touch ${builddir}/cmake-stamp touch ${builddir}/cmake-stamp
build: awesome awesome-client build: awesome awesome-client
@echo -n "Creating new build directory…" $(ECHO) -n "Creating new build directory…"
@mkdir -p ${builddir} mkdir -p ${builddir}
@ln -s -f ${builddir} build ln -s -f ${builddir} build
@echo " done" $(ECHO) " done"
awesome: awesome:
@ln -s -f ${builddir}/awesome awesome @ln -s -f ${builddir}/awesome awesome
@ -27,8 +34,8 @@ awesome-client:
@ln -s -f ${builddir}/awesome-client awesome-client @ln -s -f ${builddir}/awesome-client awesome-client
clean: clean:
@echo -n "Cleaning up build directory…" $(ECHO) -n "Cleaning up build directory…"
@rm -rf ${builddir} build @rm -rf ${builddir} build
@echo " done" $(ECHO) " done"
.PHONY: clean .PHONY: clean