Imported Upstream version 17.2.2
[platform/upstream/libzypp.git] / Makefile.cvs
index c68cd82..3dfffe4 100644 (file)
@@ -1,20 +1,30 @@
-## ##################################################
-## Makefile.cvs
-## ##################################################
+# 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>
 
-.PHONY: default init configure reconf
+BUILD_SUBDIR           = build
+HERE_FROM_BUILD_SUBDIR = ..
+PREFIX                 = /usr
+CMAKE                  = /usr/bin/cmake
 
-PREFIX = /usr
+all:   cmake
 
-default: configure
 
-configure: init
-       ./configure --prefix=$(PREFIX)
+cmake: create-build-subdir create-toplevel-makefile
+       ( cd $(BUILD_SUBDIR) && $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(HERE_FROM_BUILD_SUBDIR) )
 
-init:
-       rm -rf autom4te.cache
-       autoreconf --force --install --symlink --verbose
 
-reconf: init
-       ./config.status --recheck
-       ./config.status
+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
+