From f94a003518388add84573e70bdaab062059c8402 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Tue, 20 Nov 2007 15:03:20 +0000 Subject: [PATCH] added Makefile.cvs --- Makefile.cvs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile.cvs diff --git a/Makefile.cvs b/Makefile.cvs new file mode 100644 index 0000000..3dfffe4 --- /dev/null +++ b/Makefile.cvs @@ -0,0 +1,30 @@ +# Generic Makefile.cvs for CMake-based projects: +# +# Create a subdirecory build/ and call cmake from there with /usr prefix. +# +# Intentionally using /usr rather than the default /usr/local since this is for +# internal use, and we are the distribution makers: /usr/local is off limits +# for us. +# +# Author: Stefan Hundhammer + +BUILD_SUBDIR = build +HERE_FROM_BUILD_SUBDIR = .. +PREFIX = /usr +CMAKE = /usr/bin/cmake + +all: cmake + + +cmake: create-build-subdir create-toplevel-makefile + ( cd $(BUILD_SUBDIR) && $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(HERE_FROM_BUILD_SUBDIR) ) + + +create-build-subdir: + test -d $(BUILD_SUBDIR) || mkdir $(BUILD_SUBDIR) + + +create-toplevel-makefile: + echo 'all:' >Makefile + echo -e '\t$$(MAKE) $$(MAKEFLAGS) -C $(BUILD_SUBDIR)' >>Makefile + -- 2.7.4