build: rework makefile

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-01 17:07:51 +02:00
parent 3750b08248
commit 885ea9cb89
1 changed files with 10 additions and 12 deletions

View File

@ -8,29 +8,27 @@ install: cmake
@echo "Installing…" @echo "Installing…"
make -C build install make -C build install
cmake: build CMakeLists.txt cmake: build/cmake-stamp
CMakeLists.txt: awesomeConfig.cmake build/cmake-stamp: build CMakeLists.txt awesomeConfig.cmake
awesomeConfig.cmake:
@echo "Running cmake…" @echo "Running cmake…"
cd ${builddir} && cmake "$@" .. cd ${builddir} && cmake "$@" ..
touch ${builddir}/cmake-stamp
build: 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
@echo " done" @echo " done"
@echo -n "Setting up links…" awesome:
@rm build @ln -s -f ${builddir}/awesome awesome
@ln -s ${builddir} build
@rm awesome awesome-client awesome-client:
@ln -s ${builddir}/awesome awesome @ln -s -f ${builddir}/awesome-client awesome-client
@ln -s ${builddir}/awesome-client awesome-client
@echo " done"
clean: clean:
@echo -n "Cleaning up build directory…" @echo -n "Cleaning up build directory…"
@rm -rf ${builddir} @rm -rf ${builddir} build
@echo " done" @echo " done"
.PHONY: clean .PHONY: clean