From a7474cd78ec8121fae7dcf063da69238084ef619 Mon Sep 17 00:00:00 2001 From: polos Date: Fri, 28 Apr 2017 16:07:52 +0200 Subject: [PATCH] add 'eql5.pro' for simpler build process --- .gitignore | 1 + README-1.txt | 25 +++++++------- README-2-REBUILD.txt | 16 ++++----- README-3-OPTIONAL.txt | 3 +- src/eql.cpp | 2 +- src/eql5.pro | 24 ++++++++++++++ ...l-lib-wrappers.lisp => make-wrappers.lisp} | 0 src/{make-eql-lib.lisp => make.lisp} | 14 ++++++++ src/rebuild | 33 ++----------------- 9 files changed, 62 insertions(+), 56 deletions(-) create mode 100644 src/eql5.pro rename src/{make-eql-lib-wrappers.lisp => make-wrappers.lisp} (100%) rename src/{make-eql-lib.lisp => make.lisp} (70%) diff --git a/.gitignore b/.gitignore index b5627c9..8509081 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ t.lisp tr.h moc_*.cpp Makefile +Makefile.* eql eql5 eql.app diff --git a/README-1.txt b/README-1.txt index db7fde0..70823b4 100644 --- a/README-1.txt +++ b/README-1.txt @@ -81,7 +81,7 @@ hard-coded in the executable). BUILD ===== -(N.B. for rebuilding, please see README-REBUILD.txt) +(N.B. for rebuilding, please see README-2-REBUILD.txt) [Windows] You first need to adapt the file 'src/windows.pri' (include & library @@ -103,21 +103,18 @@ BUILD flag: qmake -spec macx-g++ -1) In src/ run: +1) Change to src/ and run: - ecl -shell make-eql-lib.lisp + ecl -shell make.lisp -2) Do: +2) Edit 'eql5.pro' and comment out all modules you don't need (see comment). + Then run: - qmake eql_lib.pro + qmake eql5.pro make - sudo make install (unix only) + sudo make install (Unix only) - qmake eql_exe.pro - make - sudo make install (unix only) - - This will build both the EQL executable and shared library. + This will build the executable, the shared library and the modules. If you ran "make install", you'll find the installed files here: @@ -128,7 +125,7 @@ BUILD 3) cd .. [Linux] - N.B: skip this if you did "sudo make install" + N.B. skip this if you did "sudo make install" You need to create links to EQL, something like (note the "5"): cd /usr/lib @@ -137,7 +134,7 @@ BUILD sudo ln -s ~/eql5/eql5 eql5 [OSX] - N.B: skip this if you did "sudo make install" + N.B. skip this if you did "sudo make install" You need to create links to EQL, something like (note the "5"): cd /usr/local/lib @@ -199,7 +196,7 @@ To build an EQL module (corresponding to a Qt module), do the following in src/: sudo make install (unix only) [Linux,OSX] - (N.B: skip this if you did "sudo make install") + (N.B. skip this if you did "sudo make install") You need to create links to the modules, see EQL library above. In Lisp, use function QREQUIRE to load a module: diff --git a/README-2-REBUILD.txt b/README-2-REBUILD.txt index fea03fd..16a1bb4 100644 --- a/README-2-REBUILD.txt +++ b/README-2-REBUILD.txt @@ -5,25 +5,21 @@ REBUILD STEPS (on every upgrade of: ECL, Qt, EQL) 1) remove directory tmp/ -2) ecl -shell make-eql-lib.lisp +2) ecl -shell make.lisp -3) qmake, make, sudo make install (Unix only) in this order: (MSVC: nmake) - - eql_lib.pro - eql_exe.pro - - module_network.pro - module_... +3) qmake eql5.pro + make (MSVC: nmake) + sudo make install (Unix only) Optionally (integrate wrapper functions): -4) eql5 make-eql-lib-wrappers.lisp +4) eql5 make-wrappers.lisp 5) re-link EQL library: touch tmp/eql.o (or delete "tmp/eql.o*") qmake eql_lib.pro - make + make (MSVC: nmake) sudo make install (Unix only) diff --git a/README-3-OPTIONAL.txt b/README-3-OPTIONAL.txt index c488bae..cd24c67 100644 --- a/README-3-OPTIONAL.txt +++ b/README-3-OPTIONAL.txt @@ -17,13 +17,14 @@ Notes If you want to add the wrappers permanently, build EQL as usual, then run - eql5 make-eql-lib-wrappers.lisp ; (will take a little looong) + eql5 make-wrappers.lisp Re-link EQL doing something like: touch tmp/eql.o* (or delete "tmp/eql.o*") qmake eql_lib.pro make + sudo make install (Unix only) (The resulting shared library will be considerably bigger than before). diff --git a/src/eql.cpp b/src/eql.cpp index d4ba7a3..bd5e411 100644 --- a/src/eql.cpp +++ b/src/eql.cpp @@ -18,7 +18,7 @@ EQL::EQL() : QObject() { cl_boot(1, (char**)_argv_); } iniCLFunctions(); LObjects::ini(this); - read_VV(OBJNULL, ini_EQL); } // see "src/make-eql-lib.lisp" + read_VV(OBJNULL, ini_EQL); } // see "src/make.lisp" void EQL::ini(char** argv) { cl_booted = true; diff --git a/src/eql5.pro b/src/eql5.pro new file mode 100644 index 0000000..c408a00 --- /dev/null +++ b/src/eql5.pro @@ -0,0 +1,24 @@ +TEMPLATE = subdirs + +SUBDIRS = lib exe \ + # comment out all modules you don't need: + help \ + multimedia \ + network \ + quick \ + sql \ + svg \ + webengine \ + webkit + +lib.file = eql_lib.pro +exe.depends = lib +exe.file = eql_exe.pro +help.file = module_help.pro +multimedia.file = module_multimedia.pro +network.file = module_network.pro +quick.file = module_quick.pro +sql.file = module_sql.pro +svg.file = module_svg.pro +webengine.file = module_webengine.pro +webkit.file = module_webkit.pro diff --git a/src/make-eql-lib-wrappers.lisp b/src/make-wrappers.lisp similarity index 100% rename from src/make-eql-lib-wrappers.lisp rename to src/make-wrappers.lisp diff --git a/src/make-eql-lib.lisp b/src/make.lisp similarity index 70% rename from src/make-eql-lib.lisp rename to src/make.lisp index 2c0b786..ebecfb9 100644 --- a/src/make-eql-lib.lisp +++ b/src/make.lisp @@ -23,3 +23,17 @@ (format nil "lisp/~A.~A" file #+msvc "obj" #-msvc "o")) *lisp-files*) :init-name "ini_EQL") + +;; for eql5.pro (doesn't create directories) + +(dolist (dirs '("." + "tmp/help" + "tmp/multimedia" + "tmp/network" + "tmp/quick" + "tmp/sql" + "tmp/svg" + "tmp/webengine" + "tmp/webkit")) + (ensure-directories-exist (format nil "~A/tmp/" dirs))) + diff --git a/src/rebuild b/src/rebuild index 8e32212..00fef86 100755 --- a/src/rebuild +++ b/src/rebuild @@ -2,41 +2,14 @@ rm -fr tmp rm *.a rm lisp/*.o -ecl -shell make-eql-lib.lisp && -qmake eql_lib.pro && +ecl -shell make.lisp && +qmake eql5.pro && make && sudo make install && -qmake eql_exe.pro && -make && -sudo make install && -eql5 make-eql-lib-wrappers.lisp && +eql5 make-wrappers.lisp && touch tmp/eql.o && qmake eql_lib.pro && make && -sudo make install && -qmake module_help.pro && -make && -sudo make install && -qmake module_multimedia.pro && -make && -sudo make install && -qmake module_network.pro && -make && -sudo make install && -qmake module_quick.pro && -make && -sudo make install && -qmake module_sql.pro && -make && -sudo make install && -qmake module_svg.pro && -make && -sudo make install && -# qmake module_webkit.pro && -# make -# sudo make install && -qmake module_webengine.pro && -make && sudo make install echo OK