• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision024349436cd0efbd1972455b48050cd6a541a913 (tree)
l'heure2022-04-18 20:35:47
Auteurphabrics <phabrics@phab...>
Commiterphabrics

Message de Log

Fix modules dependency issues in preparation for parallel builds.

Change Summary

Modification

--- a/contrib/tme-0.8/Makefile.am
+++ b/contrib/tme-0.8/Makefile.am
@@ -25,3 +25,10 @@ pkgdata_DATA = tmeconfig.h tmememory.h
2525 dist-hook:
2626 rm -f ${distdir}/libtme/recode-host.c
2727 find $(distdir)/edist -name CVS -a -exec rm -r {} ';' -a -prune
28+
29+# The target to update the list of modules to preopen on platforms that don't support dlopen.
30+# This will update this list to be automatically included by automake
31+# so that future builds will track all module dependencies.
32+# If new modules are added, "make modules" must be run to update this list in the source.
33+modules-local:
34+ echo -n LDADD = > $(top_srcdir)/tme-preopen.txt
--- a/contrib/tme-0.8/configure.ac
+++ b/contrib/tme-0.8/configure.ac
@@ -42,6 +42,7 @@ AC_CANONICAL_TARGET
4242 #AC_CONFIG_MACRO_DIR([libltdl/m4])
4343 AC_CONFIG_LIBOBJ_DIR([lib])
4444 AM_INIT_AUTOMAKE([subdir-objects])
45+AM_EXTRA_RECURSIVE_TARGETS([modules])
4546 AM_PROG_CC_C_O
4647 AC_PREFIX_PROGRAM([tmesh])
4748
@@ -1163,11 +1164,7 @@ LT_INIT([dlopen,win32-dll])
11631164 LT_LANG([Windows Resource])
11641165 LTDL_INIT([recursive installable])
11651166 CPPFLAGS="${CPPFLAGS-} ${LTDLINCL}"
1166-TME_PREOPEN=
1167-if test "x${enable_static}" = "xyes"; then
1168- TME_PREOPEN='`sort -u $(top_builddir)/tme-preopen.txt`'
1169-fi
1170-AC_SUBST(TME_PREOPEN)
1167+AM_CONDITIONAL([USING_PREOPEN], [test "x${enable_static}" = "xyes"])
11711168
11721169 AC_ARG_VAR([IFCONFIG], [full path to ipconfig utility])
11731170 AC_ARG_VAR([ROUTE], [full path to route utility])
--- a/contrib/tme-0.8/host/gtk/gtk-screen.c
+++ b/contrib/tme-0.8/host/gtk/gtk-screen.c
@@ -561,8 +561,12 @@ TME_ELEMENT_SUB_NEW_DECL(tme_host_gtk,display) {
561561
562562 gdk_monitor_get_workarea(display->tme_gdk_display_monitor, &workarea);
563563
564- if(workarea.width) display->display.tme_screen_width = workarea.width;
565- if(workarea.height) display->display.tme_screen_height = workarea.height;
564+ if(GDK_IS_MONITOR(display->tme_gdk_display_monitor) &&
565+ workarea.width &&
566+ workarea.height) {
567+ display->display.tme_screen_width = workarea.width;
568+ display->display.tme_screen_height = workarea.height;
569+ }
566570
567571 /* set the display-specific functions: */
568572 display->display.tme_display_bell = _tme_gtk_display_bell;
--- a/contrib/tme-0.8/modules
+++ b/contrib/tme-0.8/modules
@@ -35,7 +35,7 @@
3535 # build modules. it updates the modules index that will be installed
3636 # along with all of the modules, and also handles some static building
3737 # details. this is done with an all-local target:
38-all-local:
38+
3939 #
4040 # first, all source files in the current directory are searched for
4141 # element "new" function declarations. these declarations provide
@@ -53,6 +53,7 @@ all-local:
5353 # this is abuse of the $(top_builddir)/tme directory, yes, since
5454 # this directory was originally just for include files and to make
5555 # #include <tme/FOO.h> work right when building:
56+install-exec-local:
5657 @echo updating tme modules list..
5758 @grep TME_ELEMENT_NEW_DECL $(srcdir)/*.c | \
5859 sed -e 's%.*TME_ELEMENT_NEW_DECL(\(.*\)).*%\1%' \
@@ -63,6 +64,7 @@ all-local:
6364 @grep TME_ELEMENT_X_NEW_DECL $(srcdir)/*.c | \
6465 sed -e 's%.*TME_ELEMENT_X_NEW_DECL(\(.*\),\(.*\),\(.*\)).*%\1\3 \1\2 \3%' \
6566 >> $(top_builddir)/tme/tme-plugins.txt
67+
6668 #
6769 # next, when building statically, either for debugging purposes or
6870 # because we're on a weak platform, we have to use libtool's "preopen"
@@ -82,6 +84,16 @@ all-local:
8284 # else it will substitute the empty string. when linking programs,
8385 # @TME_PREOPEN@ is then used on the program's link command line.
8486 #
87+# Note: this works differently now - please see comment in top Makefile for modules target
88+modules-local:
89+ @if test "x$(pkglib_LTLIBRARIES)" != x; then \
90+ for module in $(pkglib_LTLIBRARIES); do \
91+ echo $$module ; \
92+ echo " \\" >> $(top_srcdir)/tme-preopen.txt ; \
93+ echo -ne "\t-dlopen ../$(subdir)/$$module" >> $(top_srcdir)/tme-preopen.txt ; \
94+ done ; \
95+ fi
96+
8597 # additionally, libtool, at least through version 1.5, has a
8698 # limitation in that the pseudo-library (the .la file) must be present
8799 # even for a preloaded module. if we aren't debugging, everything is
@@ -95,10 +107,10 @@ all-local:
95107 # module.c can find the uninstalled tme-plugins.txt file, and libtool
96108 # will want to look in this directory for .la files, so we simply copy
97109 # all of the .la files into that same directory:
110+all-local:
98111 @if test "x$(pkglib_LTLIBRARIES)" != x; then \
99112 for module in $(pkglib_LTLIBRARIES); do \
100113 echo $$module ; \
101- echo -dlopen ../$(subdir)/$$module >> $(top_builddir)/tme-preopen.txt ; \
102114 cp $$module $(top_builddir)/tme ; \
103115 done ; \
104116 fi
--- /dev/null
+++ b/contrib/tme-0.8/tme-preopen.txt
@@ -0,0 +1,33 @@
1+LDADD = \
2+ -dlopen ../generic/tme_generic.la \
3+ -dlopen ../ic/m68k/tme_ic_m68k.la \
4+ -dlopen ../ic/sparc/tme_ic_sparc.la \
5+ -dlopen ../ic/stp22xx/tme_ic_stp22xx.la \
6+ -dlopen ../ic/tme_ic_am9513.la \
7+ -dlopen ../ic/tme_ic_mm58167.la \
8+ -dlopen ../ic/tme_ic_z8530.la \
9+ -dlopen ../ic/tme_ic_i825x6.la \
10+ -dlopen ../ic/tme_ic_isil7170.la \
11+ -dlopen ../ic/tme_ic_ncr5380.la \
12+ -dlopen ../ic/tme_ic_am7930.la \
13+ -dlopen ../ic/tme_ic_am7990.la \
14+ -dlopen ../ic/tme_ic_ncr53c9x.la \
15+ -dlopen ../ic/tme_ic_mk48txx.la \
16+ -dlopen ../ic/tme_ic_lsi64854.la \
17+ -dlopen ../ic/tme_ic_nec765.la \
18+ -dlopen ../ic/tme_ic_ncr89c105.la \
19+ -dlopen ../ic/tme_ic_stp2024.la \
20+ -dlopen ../ic/tme_ic_ad184x.la \
21+ -dlopen ../machine/sun2/tme_machine_sun2.la \
22+ -dlopen ../machine/sun3/tme_machine_sun3.la \
23+ -dlopen ../machine/sun4/tme_machine_sun4.la \
24+ -dlopen ../host/posix/tme_host_posix.la \
25+ -dlopen ../host/bsd/tme_host_bsd.la \
26+ -dlopen ../host/tun/tme_host_tun.la \
27+ -dlopen ../host/openvpn/tme_host_openvpn.la \
28+ -dlopen ../host/rfb/tme_host_rfb.la \
29+ -dlopen ../host/gtk/tme_host_gtk.la \
30+ -dlopen ../bus/multibus/tme_bus_multibus.la \
31+ -dlopen ../bus/sbus/tme_bus_sbus.la \
32+ -dlopen ../serial/tme_serial_kb.la \
33+ -dlopen ../scsi/tme_scsi.la
\ No newline at end of file
--- a/contrib/tme-0.8/tmesh/Makefile.am
+++ b/contrib/tme-0.8/tmesh/Makefile.am
@@ -19,8 +19,9 @@ libtmesh_la_SOURCES = \
1919 libtmesh_la_LIBADD = $(top_builddir)/libtme/libtme.la
2020
2121 bin_PROGRAMS = tmesh
22-tmesh_LDADD = libtmesh.la
23-tmesh_LDFLAGS = -dlpreopen force -dlopen self @TME_PREOPEN@
22+tmesh_LDADD = libtmesh.la $(LDADD)
23+tmesh_LDFLAGS = -dlpreopen force -dlopen self
24+include $(top_srcdir)/tme-preopen.txt
2425
2526 install-exec-hook:
2627 $(SETCAP) $(DESTDIR)$(bindir)/$(TGTPFX)tmesh$(EXEEXT)