aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch
blob: 95b4281836706f1bc6fc7d6cd9f131fe6d5b00b9 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Upstream-Status: Inappropriate  [OE-Specific]

When building emacs, it builds some tools for the HOST
that are then used to build for target, such as
make-fingerprint and make-docfile, this needs to be
adapted to be used by bitbake, otherwise the compiled
executables arent compatible with the HOST.

Use the above mentioned tools provided by the native
version of the recipe instead.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>

Index: emacs-28.2/src/Makefile.in
===================================================================
--- emacs-28.2.orig/src/Makefile.in
+++ emacs-28.2/src/Makefile.in
@@ -462,7 +462,7 @@ ifeq ($(CHECK_STRUCTS),true)
 pdumper.o: dmpstruct.h
 endif
 dmpstruct.h: $(srcdir)/dmpstruct.awk
-dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
+dmpstruct.h:  $(dmpstruct_headers)
 	$(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
 		$(dmpstruct_headers) > $@
 
@@ -563,8 +563,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@
 ## Strictly speaking, emacs does not depend directly on all of $lisp,
 ## since not all pieces are used on all platforms.  But DOC depends
 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
-emacs$(EXEEXT): temacs$(EXEEXT) \
-                lisp.mk $(etc)/DOC $(lisp) \
+emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \
                 $(lispsource)/international/charprop.el ${charsets}
 ifeq ($(SYSTEM_TYPE),cygwin)
 	find ${top_builddir} -name '*.eln' | rebase -v -O -T -
@@ -597,15 +596,15 @@ endif
 ## for the first time, this prevents any variation between configurations
 ## in the contents of the DOC file.
 ##
-$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
+$(etc)/DOC: lisp.mk $(obj) $(lisp)
 	$(AM_V_GEN)$(MKDIR_P) $(etc)
 	$(AM_V_at)rm -f $(etc)/DOC
-	$(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
+	make-docfile -d $(srcdir) \
 	  $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
-	$(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
+	make-docfile -a $(etc)/DOC -d $(lispsource) \
 	  $(shortlisp)
 
-$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
+$(libsrc)/make-fingerprint$(EXEEXT): \
   $(lib)/libgnu.a
 	$(MAKE) -C $(dir $@) $(notdir $@)
 
@@ -618,8 +617,8 @@ buildobj.h: Makefile
 
 GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
 
-gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
-	$(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > globals.tmp
+gl-stamp: $(GLOBAL_SOURCES)
+	make-docfile -d $(srcdir) -g $(obj) > globals.tmp
 	$(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h
 	$(AM_V_at)echo timestamp > $@
 
@@ -633,7 +632,7 @@ $(LIBEGNU_ARCHIVE): $(config_h)
 	$(MAKE) -C $(dir $@) all
 
 ifeq ($(HAVE_PDUMPER),yes)
-  MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
+  MAKE_PDUMPER_FINGERPRINT = make-fingerprint
 else
   MAKE_PDUMPER_FINGERPRINT =
 endif
@@ -643,7 +642,7 @@ endif
 ## This goes on to affect various things, and the emacs binary fails
 ## to start if Vinstallation_directory has the wrong value.
 temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
-  $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT)
+  $(charsets) $(charscript) ${emoji-zwj}
 	$(AM_V_CCLD)$(CC) -o $@.tmp \
 	  $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
 	  $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)