emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ada-mode d5428433e3: Add Makefile for compiling in elpa


From: Stephen Leake
Subject: [elpa] externals/ada-mode d5428433e3: Add Makefile for compiling in elpa worktree
Date: Sat, 9 Jul 2022 19:08:50 -0400 (EDT)

branch: externals/ada-mode
commit d5428433e39f3de7168fdc891127a2dcff849904
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

    Add Makefile for compiling in elpa worktree
    
    * prj.el: Match ada-mode changes.
    
    * Makefile: New file.
    * Makefile.conf: New file.
    * create_makefile_conf.sh: New file.
---
 Makefile                | 40 ++++++++++++++++++++++++++++++++++++++++
 Makefile.conf           |  2 ++
 create_makefile_conf.sh | 19 +++++++++++++++++++
 prj.el                  |  8 ++++----
 4 files changed, 65 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..657aba1526
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+# For compiling ada-mode Ada code in elpa worktree
+
+export Standard_Common_Build := Debug
+
+.PHONY : all force
+
+all : build_executables
+
+Makefile.conf : create_makefile_conf.sh
+       $(SHELL) -c ./create_makefile_conf.sh
+
+include Makefile.conf
+
+build_executables : ada_mode_wisi_parse.gpr gpr_re2c.c ada_annex_p_re2c.c force
+       gprbuild -p -j8 ada_mode_wisi_parse.gpr
+
+../wisi/wisi.gpr : ../wisi/wisi.gpr.gp
+       gnatprep -DELPA="yes" ../wisi/wisi.gpr.gp ../wisi/wisi.gpr
+
+ada_mode_wisi_parse.gpr : ada_mode_wisi_parse.gpr.gp ../wisi/wisi.gpr
+       gnatprep -DELPA="yes" -DHAVE_GNAT_UTIL=$(HAVE_GNAT_UTIL) 
-DHAVE_LIBADALANG=$(HAVE_LIBADALANG) $< $@
+
+%.re2c : %.wy ../wisi/wisitoken-bnf-generate
+       ../wisi/wisitoken-bnf-generate --time $(<F)
+       dos2unix -q $(*F)-process.el $(*F)_process* $(*F).re2c $(*F)_re2c_c.ads
+
+%_re2c.c : %.re2c
+       re2c --no-generation-date --debug-output --input custom -W -Werror 
--utf-8 -o $@ $<
+       dos2unix -q $(*F)_re2c.c
+
+../wisi/wisitoken-bnf-generate : ../wisi/wisi.gpr force
+       cd ../wisi; gprbuild -p -j8 -P wisi.gpr wisitoken-bnf-generate
+
+recursive-clean : force
+       gprclean -r -P ada_mode_wisi_parse.gpr
+
+# Local Variables:
+# eval: (load-file "prj.el")
+# End:
+# end of file
diff --git a/Makefile.conf b/Makefile.conf
new file mode 100644
index 0000000000..abe5ad2a5d
--- /dev/null
+++ b/Makefile.conf
@@ -0,0 +1,2 @@
+HAVE_LIBADALANG := "no"
+HAVE_GNAT_UTIL := "no"
diff --git a/create_makefile_conf.sh b/create_makefile_conf.sh
new file mode 100755
index 0000000000..6ec4d8c2db
--- /dev/null
+++ b/create_makefile_conf.sh
@@ -0,0 +1,19 @@
+# Create Makefile.conf, which defines HAVE_LIBADALANG
+
+echo 'with "libadalang"; abstract project check is end check;' > check.gpr
+gprbuild -P check.gpr > /dev/null 2>&1
+if test $? -eq 0 ; then
+    echo 'HAVE_LIBADALANG := "yes"' >> Makefile.conf
+else
+    echo 'HAVE_LIBADALANG := "no"' >> Makefile.conf
+fi
+
+echo 'with "gnat_util"; abstract project check is end check;' > check.gpr
+gprbuild -P check.gpr > /dev/null 2>&1
+if test $? -eq 0 ; then
+    echo 'HAVE_GNAT_UTIL := "yes"' >> Makefile.conf
+else
+    echo 'HAVE_GNAT_UTIL := "no"' >> Makefile.conf
+fi
+
+# end of file
diff --git a/prj.el b/prj.el
index c5f46c8145..c90d416abe 100644
--- a/prj.el
+++ b/prj.el
@@ -1,18 +1,18 @@
 ;; Emacs wisi project definitions for compiling ada-mode in ELPA workspace
 ;;
-;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2021, 2022  Free Software Foundation, Inc.
 
 (let ((wisi-core (expand-file-name "../wisi")))
 
   (wisi-prj-select-cache
    "ada_mode.prj"
-   (wisi-prj-default ;; for ada-build prj vars
-    (create-ada-prj
+   (create-ada-prj
     :name "ada_mode elpa"
     :compile-env
     (list
-     (concat "WISI=" wisi-core))))
+     (concat "WISI=" wisi-core)))
    "Makefile"
    ))
 
+(ada-parse-require-process) ;; slow start due to lr1 parse table
 ;; end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]