summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-09 13:31:49 +0000
committermidipix <writeonce@midipix.org>2021-04-10 20:54:54 +0000
commita59b8ac1cf10f98d343331ae669862cb20e746af (patch)
tree34a74d1c7c6d30c967316a8b3d28c15fc929bc99
parent1aa4655f3b8b4246b9b202a520b0d520b1f13410 (diff)
downloadsbpython3-a59b8ac1cf10f98d343331ae669862cb20e746af.tar.bz2
sbpython3-a59b8ac1cf10f98d343331ae669862cb20e746af.tar.xz
build system: posix make support: refactored build-flavor dependency schemes.
-rw-r--r--Makefile.in8
-rwxr-xr-xconfigure34
-rw-r--r--sofort/config/opt.vars8
-rw-r--r--sofort/core/_flavor/flavor_app_frontend_disabled.mk6
-rw-r--r--sofort/core/_flavor/flavor_app_frontend_enabled.mk6
-rw-r--r--sofort/core/_flavor/flavor_app_linking_all_shared.mk7
-rw-r--r--sofort/core/_flavor/flavor_app_linking_all_static.mk7
-rw-r--r--sofort/core/_flavor/flavor_app_linking_default.mk7
-rw-r--r--sofort/core/_flavor/flavor_install_headers_custom.mk4
-rw-r--r--sofort/core/_flavor/flavor_install_headers_default.mk4
-rw-r--r--sofort/core/_flavor/flavor_shared_library_disabled.mk5
-rw-r--r--sofort/core/_flavor/flavor_shared_library_enabled.mk5
-rw-r--r--sofort/core/_flavor/flavor_static_library_disabled.mk5
-rw-r--r--sofort/core/_flavor/flavor_static_library_enabled.mk5
-rw-r--r--sofort/core/flavor.mk69
15 files changed, 116 insertions, 64 deletions
diff --git a/Makefile.in b/Makefile.in
index ed67e4c..7e4ee78 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -121,6 +121,14 @@ SHARED_LIB_LDFLAGS = @shared_lib_ldflags@
VERSION_OPT = @version_opt@
+SHARED_LIBRARY_OPT = @shared_library_opt@
+STATIC_LIBRARY_OPT = @static_library_opt@
+
+APP_FRONTEND_OPT = @app_frontend_opt@
+APP_LINKING_OPT = @app_linking_opt@
+
+INSTALL_HEADERS_OPT = @install_headers_opt@
+
.cflags-host:
@printf '%s' "$(CFLAGS)"
diff --git a/configure b/configure
index df05578..a555eb6 100755
--- a/configure
+++ b/configure
@@ -657,6 +657,40 @@ config_opts()
else
mb_version_opt='used'
fi
+
+ if [ "$mb_custom_install_headers" = 'yes' ]; then
+ mb_install_headers_opt='custom'
+ else
+ mb_install_headers_opt='default'
+ fi
+
+ if [ "$mb_disable_static" = 'yes' ]; then
+ mb_static_library_opt='disabled'
+ else
+ mb_static_library_opt='enabled'
+ fi
+
+ if [ "$mb_disable_shared" = 'yes' ]; then
+ mb_shared_library_opt='disabled'
+ else
+ mb_shared_library_opt='enabled'
+ fi
+
+ if [ "$mb_disable_frontend" = 'yes' ]; then
+ mb_app_frontend_opt='disabled'
+ else
+ mb_app_frontend_opt='enabled'
+ fi
+
+ if [ "$mb_all_static" = 'yes' ]; then
+ mb_app_linking_opt='all_static'
+
+ elif [ "$mb_all_shared" = 'yes' ]; then
+ mb_app_linking_opt='all_shared'
+
+ else
+ mb_app_linking_opt='default'
+ fi
}
config_copy()
diff --git a/sofort/config/opt.vars b/sofort/config/opt.vars
index c2ff58d..e71ea56 100644
--- a/sofort/config/opt.vars
+++ b/sofort/config/opt.vars
@@ -1 +1,9 @@
version_opt
+
+shared_library_opt
+static_library_opt
+
+app_frontend_opt
+app_linking_opt
+
+install_headers_opt
diff --git a/sofort/core/_flavor/flavor_app_frontend_disabled.mk b/sofort/core/_flavor/flavor_app_frontend_disabled.mk
new file mode 100644
index 0000000..31ad23a
--- /dev/null
+++ b/sofort/core/_flavor/flavor_app_frontend_disabled.mk
@@ -0,0 +1,6 @@
+# flavor_app_frontend_disabled.mk: handling of frontend build options.
+# this file is covered by COPYING.SOFORT.
+
+app-tag:
+package-install-app:
+package-install-extras:
diff --git a/sofort/core/_flavor/flavor_app_frontend_enabled.mk b/sofort/core/_flavor/flavor_app_frontend_enabled.mk
new file mode 100644
index 0000000..ebbc256
--- /dev/null
+++ b/sofort/core/_flavor/flavor_app_frontend_enabled.mk
@@ -0,0 +1,6 @@
+# flavor_app_frontend_enabled.mk: handling of frontend build options.
+# this file is covered by COPYING.SOFORT.
+
+app-tag: package-app app.tag
+package-install-app: install-app
+package-install-extras: install-extras
diff --git a/sofort/core/_flavor/flavor_app_linking_all_shared.mk b/sofort/core/_flavor/flavor_app_linking_all_shared.mk
new file mode 100644
index 0000000..d674c84
--- /dev/null
+++ b/sofort/core/_flavor/flavor_app_linking_all_shared.mk
@@ -0,0 +1,7 @@
+# flavor_app_linking_all_shared.mk: handling of frontend linking options.
+# this file is covered by COPYING.SOFORT.
+
+package-app: shared-app
+app: PACKAGE_APP = $(SHARED_APP)
+app-tag: PACKAGE_APP = $(SHARED_APP)
+app.tag: $(SHARED_APP)
diff --git a/sofort/core/_flavor/flavor_app_linking_all_static.mk b/sofort/core/_flavor/flavor_app_linking_all_static.mk
new file mode 100644
index 0000000..855283b
--- /dev/null
+++ b/sofort/core/_flavor/flavor_app_linking_all_static.mk
@@ -0,0 +1,7 @@
+# flavor_app_linking_all_static.mk: handling of frontend linking options.
+# this file is covered by COPYING.SOFORT.
+
+package-app: static-app
+app: PACKAGE_APP = $(STATIC_APP)
+app-tag: PACKAGE_APP = $(STATIC_APP)
+app.tag: $(STATIC_APP)
diff --git a/sofort/core/_flavor/flavor_app_linking_default.mk b/sofort/core/_flavor/flavor_app_linking_default.mk
new file mode 100644
index 0000000..99ca8b3
--- /dev/null
+++ b/sofort/core/_flavor/flavor_app_linking_default.mk
@@ -0,0 +1,7 @@
+# flavor_app_linking_default.mk: handling of frontend linking options.
+# this file is covered by COPYING.SOFORT.
+
+package-app: default-app
+app: PACKAGE_APP = $(DEFAULT_APP)
+app-tag: PACKAGE_APP = $(DEFAULT_APP)
+app.tag: $(DEFAULT_APP)
diff --git a/sofort/core/_flavor/flavor_install_headers_custom.mk b/sofort/core/_flavor/flavor_install_headers_custom.mk
new file mode 100644
index 0000000..4f8da97
--- /dev/null
+++ b/sofort/core/_flavor/flavor_install_headers_custom.mk
@@ -0,0 +1,4 @@
+# flavor_install_headers_custom.mk: handling of header installation option.
+# this file is covered by COPYING.SOFORT.
+
+install-headers:install-headers-custom
diff --git a/sofort/core/_flavor/flavor_install_headers_default.mk b/sofort/core/_flavor/flavor_install_headers_default.mk
new file mode 100644
index 0000000..f8b49c4
--- /dev/null
+++ b/sofort/core/_flavor/flavor_install_headers_default.mk
@@ -0,0 +1,4 @@
+# flavor_install_headers_default.mk: handling of header installation option.
+# this file is covered by COPYING.SOFORT.
+
+install-headers:install-headers-default
diff --git a/sofort/core/_flavor/flavor_shared_library_disabled.mk b/sofort/core/_flavor/flavor_shared_library_disabled.mk
new file mode 100644
index 0000000..9846e1b
--- /dev/null
+++ b/sofort/core/_flavor/flavor_shared_library_disabled.mk
@@ -0,0 +1,5 @@
+# flavor_shared_library_disabled.mk: handling of shared library dependencies.
+# this file is covered by COPYING.SOFORT.
+
+package-shared:
+package-install-shared:
diff --git a/sofort/core/_flavor/flavor_shared_library_enabled.mk b/sofort/core/_flavor/flavor_shared_library_enabled.mk
new file mode 100644
index 0000000..2e54d21
--- /dev/null
+++ b/sofort/core/_flavor/flavor_shared_library_enabled.mk
@@ -0,0 +1,5 @@
+# flavor_shared_library_enabled.mk: handling of shared library dependencies.
+# this file is covered by COPYING.SOFORT.
+
+package-shared: shared
+package-install-shared: install-shared
diff --git a/sofort/core/_flavor/flavor_static_library_disabled.mk b/sofort/core/_flavor/flavor_static_library_disabled.mk
new file mode 100644
index 0000000..e46d186
--- /dev/null
+++ b/sofort/core/_flavor/flavor_static_library_disabled.mk
@@ -0,0 +1,5 @@
+# flavor_static_library_disabled.mk: handling of static library dependencies.
+# this file is covered by COPYING.SOFORT.
+
+package-static:
+package-install-static:
diff --git a/sofort/core/_flavor/flavor_static_library_enabled.mk b/sofort/core/_flavor/flavor_static_library_enabled.mk
new file mode 100644
index 0000000..20d4bd8
--- /dev/null
+++ b/sofort/core/_flavor/flavor_static_library_enabled.mk
@@ -0,0 +1,5 @@
+# flavor_static_library_enabled.mk: handling of static library dependencies.
+# this file is covered by COPYING.SOFORT.
+
+package-static: static
+package-install-static: install-static
diff --git a/sofort/core/flavor.mk b/sofort/core/flavor.mk
index 45b16d7..6a7c97a 100644
--- a/sofort/core/flavor.mk
+++ b/sofort/core/flavor.mk
@@ -3,69 +3,10 @@
include $(PROJECT_DIR)/sofort/exrules/$(OS_DSO_EXRULES).mk
-ifeq ($(DISABLE_STATIC),yes)
-package-static:
-package-install-static:
-else
-package-static: static
-package-install-static: install-static
-endif
+include $(PROJECT_DIR)/sofort/core/_flavor/flavor_static_library_$(STATIC_LIBRARY_OPT).mk
+include $(PROJECT_DIR)/sofort/core/_flavor/flavor_shared_library_$(SHARED_LIBRARY_OPT).mk
-ifeq ($(DISABLE_SHARED),yes)
-package-shared:
-package-install-shared:
-else
-package-shared: shared
-package-install-shared: install-shared
-endif
+include $(PROJECT_DIR)/sofort/core/_flavor/flavor_app_frontend_$(APP_FRONTEND_OPT).mk
+include $(PROJECT_DIR)/sofort/core/_flavor/flavor_app_linking_$(APP_LINKING_OPT).mk
-
-
-ifeq ($(DISABLE_FRONTEND),yes)
-app-tag:
-package-install-app:
-package-install-extras:
-else
-app-tag: package-app app.tag
-package-install-app: install-app
-package-install-extras: install-extras
-endif
-
-
-
-ifeq ($(ALL_STATIC),yes)
-
-package-app: static-app
-app: PACKAGE_APP = $(STATIC_APP)
-app-tag: PACKAGE_APP = $(STATIC_APP)
-app.tag: $(STATIC_APP)
-
-
-else ifeq ($(ALL_SHARED),yes)
-
-package-app: shared-app
-app: PACKAGE_APP = $(SHARED_APP)
-app-tag: PACKAGE_APP = $(SHARED_APP)
-app.tag: $(SHARED_APP)
-
-
-else
-
-package-app: default-app
-app: PACKAGE_APP = $(DEFAULT_APP)
-app-tag: PACKAGE_APP = $(DEFAULT_APP)
-app.tag: $(DEFAULT_APP)
-
-endif
-
-
-
-ifeq ($(CUSTOM_INSTALL_HEADERS),yes)
-
-install-headers:install-headers-custom
-
-else
-
-install-headers:install-headers-default
-
-endif
+include $(PROJECT_DIR)/sofort/core/_flavor/flavor_install_headers_$(INSTALL_HEADERS_OPT).mk