https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911
--- Comment #102 from David Cook <[email protected]> --- (In reply to Jonathan Druart from comment #101) > I am not very familiar with this script or how it's supposed to be used. But > from what I understand (please correct me if I'm wrong), we're supposed to > follow these three steps: > > 1. perl Makefile.PL > 2. make > 3. sudo make install > > During the first step, we list the different files ($file_map), then we > build the resource (build-resource.PL), and finally, we copy the files. > > The issue is that we are now generating multiple .js files into dists/, but > they don't exist yet during step 1. > > One possible (though not ideal) solution could be to run build-resource.PL > before generating the file map and inject `ls dists/*.js` into it. I'm not sure that I understand. Currently, we add the names of generated .js files to Makefile.PL (e.g. koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js) so that it can include them in the Makefile that is generated by "perl Makefile.PL", so that "make" knows what to build and what "make install" knows what to install. (Otherwise, it will complain that there are files there that it doesn't know about and fails to build.) Is the problem that we don't know the names of the generated files, so we can't pre-add them to Makefile.PL? Honestly, I think that there are make rules that we can add for dynamically generated files, so that we don't have to list them in Makefile.PL anymore... Some experimenting to do there... > By the way, I'm not sure why both steps 2 and 3 call build-resource.PL. So step 1 just makes the makefile. Step 2 "make" then runs builds the default target which is "makemakerdflt". "makemakedflt" builds the "all" target. The "all" target builds "compile_css_js", "pure_all", "manify_pods". build-resource.PL is run when "compile_css_js" is built. Note: I am the person who added compile_css_js to "all". I can't recall why exactly. It's something I've been meaning to revisit as it seems inefficient/unnecessary to do it twice... Step 3 calls the "install target" which for some reason I don't know which dates back to at least 2007 also includes the "all" target, so that all gets built again. We can certainly look at improving this. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
