For developers that use "make" to build WebKit, it would be useful to have targets to copy the static libraries so that one could run: make libs debug Or even more abbreviated: make l d
Why not just include WebKitLibraries in the top level Makefile's list of projects, and give it a Makefile that does the right thing? Then the obvious "make debug" will Just Work.
Created attachment 230926 [details] Patch v1
(In reply to comment #1) > Why not just include WebKitLibraries in the top level Makefile's list of projects, and give it a Makefile that does the right thing? Then the obvious "make debug" will Just Work. I had assumed for internal developers who build WKSI that this wouldn't be desirable, but I now realize the default action for copy-webkitlibraries-to-product-directory is not to overwrite newer copies of WKSI (and LLVM) static libraries, so this would be fine. New patch forthcoming.
Created attachment 230927 [details] Patch v2
Comment on attachment 230927 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=230927&action=review > WebKitLibraries/Makefile:10 > +libs l: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > + > +llvm: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > + > +wksi: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi The llvm, wksi and l targets seem unnecessary. How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to?
(In reply to comment #5) > (From update of attachment 230927 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=230927&action=review > > > WebKitLibraries/Makefile:10 > > +libs l: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > > + > > +llvm: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > > + > > +wksi: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi > > The llvm, wksi and l targets seem unnecessary. The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command). > How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to? It ends up calling productDir() in webkitdirs.pm, which uses the current set-webkit-configuration (which is set by Makefile.shared, which WebKitLibraries/Makefile includes) because we don't pass a product directory on the command line, and we don't set BUILT_PRODUCTS_DIR in the environment when the script is run. In other words, the fallback for the product directory in copy-webkitlibraries-to-product-directory is the following: 1. command-line argument, else 2. $ENV{BUILT_PRODUCTS_DIR}, else 3. productDir() in webkitdirs.pm.
(In reply to comment #6) > (In reply to comment #5) > > The llvm, wksi and l targets seem unnecessary. > > The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command). I'm okay removing these as well.
(In reply to comment #6) > (In reply to comment #5) > > (From update of attachment 230927 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=230927&action=review > > > > > WebKitLibraries/Makefile:10 > > > +libs l: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > > > + > > > +llvm: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > > > + > > > +wksi: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi > > > > The llvm, wksi and l targets seem unnecessary. > > The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command). > > > How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to? > > It ends up calling productDir() in webkitdirs.pm, which uses the current set-webkit-configuration (which is set by Makefile.shared, which WebKitLibraries/Makefile includes) because we don't pass a product directory on the command line, and we don't set BUILT_PRODUCTS_DIR in the environment when the script is run. > > In other words, the fallback for the product directory in copy-webkitlibraries-to-product-directory is the following: > > 1. command-line argument, else > 2. $ENV{BUILT_PRODUCTS_DIR}, else > 3. productDir() in webkitdirs.pm. Consider the following sequence of events: 1) set-webkit-configuration --release 2) make -C WebKitLibraries debug Based on your WebKitLibraries/Makefile, I expect this will copy the libraries in to the Release configuration's build directory rather than Debug's like the command implies. I think you'll also see warnings like so: Makefile:4: warning: overriding commands for target `debug' ../Makefile.shared:32: warning: ignoring old commands for target `debug'
Created attachment 230956 [details] Patch v3
Comment on attachment 230956 [details] Patch v3 Clearing flags on attachment: 230956 Committed r168410: <http://trac.webkit.org/changeset/168410>
All reviewed patches have been landed. Closing bug.
*** Bug 129499 has been marked as a duplicate of this bug. ***