]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'deprecate-makefile' into 'master'
authorThomas Debesse <gitlab@illwieckz.net>
Sun, 13 Oct 2019 00:57:37 +0000 (00:57 +0000)
committerThomas Debesse <gitlab@illwieckz.net>
Sun, 13 Oct 2019 00:57:37 +0000 (00:57 +0000)
deprecate the legacy Makefile

See merge request xonotic/netradiant!138

Makefile
conftest.cpp [new file with mode: 0644]
oldstuff/conftest.cpp [deleted file]

index 7e29224543a0771dcaec15bf07c16685f9e6f768..ff8161fbad379d4ea70c667d115a96b5974d5d90 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,13 @@
+# TODO: when deleting this Makefile, don't forget to also delete conftest.cpp
+# which is only required by this Makefile
+
+ifeq ($(I_KNOW_MAKEFILE_IS_DEPRECATED),)
+    $(shell printf 'ERROR: Makefile build is deprecated, use CMake instead, see README.md\n\n' >&2)
+    $(error I_KNOW_MAKEFILE_IS_DEPRECATED is not set)
+else
+    $(shell printf 'WARNING: deprecated Makefile build enforced\n\n' >&2)
+endif
+
 MAKEFILE_CONF      ?= Makefile.conf
 -include $(MAKEFILE_CONF)
 
diff --git a/conftest.cpp b/conftest.cpp
new file mode 100644 (file)
index 0000000..1c5721f
--- /dev/null
@@ -0,0 +1,8 @@
+// used by the legacy makefile to test if libraries work
+
+#include <stdio.h> /* jpeglib.h needs it */
+#include CONFTEST_HEADER
+int main(){
+       (void) CONFTEST_SYMBOL;
+       return 0;
+}
diff --git a/oldstuff/conftest.cpp b/oldstuff/conftest.cpp
deleted file mode 100644 (file)
index 10b7a62..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h> /* jpeglib.h needs it */
-#include CONFTEST_HEADER
-int main(){
-       (void) CONFTEST_SYMBOL;
-       return 0;
-}