[Qt] Make it possible (on *nix at least) to recursively call "make generated_files"
[WebKit-https.git] / DerivedSources.pro
index c450b282c6cc8481a1a89321f5acff2326832232..54845c38dda101d806e180bb7dfbe4803acd6b86 100644 (file)
@@ -5,3 +5,12 @@ SUBDIRS += \
         JavaScriptCore/DerivedSources.pro \
         WebCore/DerivedSources.pro
 
+for(subpro, SUBDIRS) {
+    subdir = $${dirname(subpro)}
+    subtarget = $$replace(subdir, [^A-Za-z0-9], _)
+    eval(generated_files-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE).DerivedSources generated_files))
+    QMAKE_EXTRA_TARGETS += generated_files-$${subtarget}
+    generated_files.depends += generated_files-$${subtarget}
+}
+
+QMAKE_EXTRA_TARGETS += generated_files