Summary: | Target dependency issue in Makefile | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Architecture, internals, and plumbing | Assignee: | David Cook <dcook> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | jonathan.druart, martin.renvoize, mtj, paul.derscheid, philippe.blouin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39623 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00
|
Circulation function: | |
Bug Depends on: | 37911, 36546 | ||
Bug Blocks: | |||
Attachments: |
Bug 39849: Fix makefile target dependency order
Bug 39849: Fix makefile target dependency order Bug 39849: Fix makefile target dependency order |
Description
David Cook
2025-05-07 06:39:50 UTC
Created attachment 182014 [details] [review] Bug 39849: Fix makefile target dependency order This patch fixes the makefile target dependency order, so that it runs in this order: 1. Build CSS and JS assets 2. Run pm_to_blib, which is the step that copies over most of Koha's files into blib 3. Move 'vue/dist' files via "move_compiled_js" makefile target/step To test: 1a. Run 'git archive --format=tar HEAD > "koha.orig.tar"' 1b. sudo mkdir /opt/koha /opt/build_koha 1c. sudo chown kohadev-koha /opt/koha /opt/build_koha 1d. mv koha.orig.tar /opt/build_koha/. 1e. cd /opt/build_koha 1f. tar xvf koha.orig.tar 2. Run "perl Makefile.PL" Choose "single" Choose "/opt/koha" for target directory Choose the defaults for the rest 3. Run "make" 4. Note the first step is the CSS/JS build 5. Note the second step is the copying of files to "blib" 6. Run "find -name 'esm.js.map'" and note it appears in the regular build location as well as in "blib" 7. Run "find -name 'swagger_bundle.json'" and note it appears in the regular build location as well as in "blib" 8. Run "make install" 9. Run the above "find" commands using "/opt/koha" and note that the files appear in the installed directory Created attachment 182024 [details] [review] Bug 39849: Fix makefile target dependency order This patch fixes the makefile target dependency order, so that it runs in this order: 1. Build CSS and JS assets 2. Run pm_to_blib, which is the step that copies over most of Koha's files into blib 3. Move 'vue/dist' files via "move_compiled_js" makefile target/step To test: 1a. Run 'git archive --format=tar HEAD > "koha.orig.tar"' 1b. sudo mkdir /opt/koha /opt/build_koha 1c. sudo chown kohadev-koha /opt/koha /opt/build_koha 1d. mv koha.orig.tar /opt/build_koha/. 1e. cd /opt/build_koha 1f. tar xvf koha.orig.tar 2. Run "perl Makefile.PL" Choose "single" Choose "/opt/koha" for target directory Choose the defaults for the rest 3. Run "make" 4. Note the first step is the CSS/JS build 5. Note the second step is the copying of files to "blib" 6. Run "find -name 'esm.js.map'" and note it appears in the regular build location as well as in "blib" 7. Run "find -name 'swagger_bundle.json'" and note it appears in the regular build location as well as in "blib" 8. Run "make install" 9. Run the above "find" commands using "/opt/koha" and note that the files appear in the installed directory Signed-off-by: Blou <philippe.blouin@inlibro.com> Signed off. Solved my issues in my dev (git, raw, non-docker devbox environment). Big thanks. (In reply to Blou from comment #3) > Signed off. > Solved my issues in my dev (git, raw, non-docker devbox environment). > Big thanks. Really happy to hear this, Philippe. Thanks for reporting the initial issue. I'll be smarter with my test plans in the future to avoid this kind of scenario again! Just noticed a problem in my test plan. I wrote "esm.js.map" but it should be "erm.js.map". Little typo there! Created attachment 182071 [details] [review] Bug 39849: Fix makefile target dependency order This patch fixes the makefile target dependency order, so that it runs in this order: 1. Build CSS and JS assets 2. Run pm_to_blib, which is the step that copies over most of Koha's files into blib 3. Move 'vue/dist' files via "move_compiled_js" makefile target/step To test: 1a. Run 'git archive --format=tar HEAD > "koha.orig.tar"' 1b. sudo mkdir /opt/koha /opt/build_koha 1c. sudo chown kohadev-koha /opt/koha /opt/build_koha 1d. mv koha.orig.tar /opt/build_koha/. 1e. cd /opt/build_koha 1f. tar xvf koha.orig.tar 2. Run "perl Makefile.PL" Choose "single" Choose "/opt/koha" for target directory Choose the defaults for the rest 3. Run "make" 4. Note the first step is the CSS/JS build 5. Note the second step is the copying of files to "blib" 6. Run "find -name 'esm.js.map'" and note it appears in the regular build location as well as in "blib" 7. Run "find -name 'swagger_bundle.json'" and note it appears in the regular build location as well as in "blib" 8. Run "make install" 9. Run the above "find" commands using "/opt/koha" and note that the files appear in the installed directory Signed-off-by: Blou <philippe.blouin@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Pushed for 25.05! Well done everyone, thank you! |