File: Makefile.cvs

package info (click to toggle)
libzypp 17.38.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,744 kB
  • sloc: cpp: 132,661; xml: 2,587; sh: 518; python: 266; makefile: 27
file content (30 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 <sh@suse.de>

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