ProjectDefinition.st
changeset 23850 4189eb0fe095
parent 23746 c67b523eb888
child 23851 5ff57df8afe9
--- a/ProjectDefinition.st	Thu Mar 07 17:14:38 2019 +0100
+++ b/ProjectDefinition.st	Thu Mar 07 17:33:00 2019 +0100
@@ -2297,6 +2297,16 @@
     ^ #()
 !
 
+nonMandatorySubProjects
+    "list subprojects which can be ignored if the folder has been removed.
+     Make will give a warning, but proceed.
+     Should be a subset of what is returned by #subProjects"
+
+    ^ #()
+
+    "Created: / 07-03-2019 / 17:31:36 / Claus Gittinger"
+!
+
 preRequisites
     "list packages which are required as a prerequisite (both mandatory and referenced).
      This is used to build dependency chains in makefiles"
@@ -2953,6 +2963,7 @@
     "Created: / 23-01-2007 / 19:08:27 / cg"
 ! !
 
+
 !ProjectDefinition class methodsFor:'description - project information'!
 
 applicationAdditionalIconFileNames
@@ -5012,33 +5023,39 @@
     "for xxxmake.bat files"
 
     ^ String streamContents:[:s |
-	(self effectiveSubProjects:#win32) do:[:packageID |
-	    |pkgLabel skipLabel joinLabel|
-
-	    pkgLabel := (packageID copyReplaceAll:$: with:$_) copyReplaceAll:$/ with:$_.
-	    skipLabel := 'skip_',pkgLabel.
-	    joinLabel := 'done_',pkgLabel.
-	    s nextPutLine:'@if not exist ',(self msdosPathToPackage:packageID from:(self package)),' goto ',skipLabel.
-	    s nextPutLine:'@echo "***********************************"'.
-	    s nextPutLine:'@echo "Building ',(packageID copyReplaceAll:$: with:$/),'"'.
-	    s nextPutLine:'@echo "***********************************"'.
-	    s nextPutLine:'@pushd ', (self msdosPathToPackage:packageID from:(self package)).
-	    s nextPutAll:'@'; nextPutAll:callString; nextPutLine:' || exit /b "%errorlevel%"'.
-	    s nextPutLine:'@popd'.
-	    s nextPutLine:'@goto ',joinLabel.
-	    s nextPutLine:':',skipLabel.
-	    s nextPutLine:'@echo "###################################"'.
-	    s nextPutLine:'@echo "FOLDER MISSING: ',(packageID copyReplaceAll:$: with:$/),'"'.
-	    s nextPutLine:'@echo "###################################"'.
-	    s nextPutLine:'exit /b 1'.
-	    s nextPutLine:':',joinLabel.
-	    s cr.
-	]
+        (self effectiveSubProjects:#win32) do:[:packageID |
+            |pkgLabel skipLabel joinLabel|
+
+            pkgLabel := (packageID copyReplaceAll:$: with:$_) copyReplaceAll:$/ with:$_.
+            skipLabel := 'skip_',pkgLabel.
+            joinLabel := 'done_',pkgLabel.
+            s nextPutLine:'@if not exist ',(self msdosPathToPackage:packageID from:(self package)),' goto ',skipLabel.
+            s nextPutLine:'@echo "***********************************"'.
+            s nextPutLine:'@echo "Building ',(packageID copyReplaceAll:$: with:$/),'"'.
+            s nextPutLine:'@echo "***********************************"'.
+            s nextPutLine:'@pushd ', (self msdosPathToPackage:packageID from:(self package)).
+            s nextPutAll:'@'; nextPutAll:callString; nextPutLine:' || exit /b "%errorlevel%"'.
+            s nextPutLine:'@popd'.
+            s nextPutLine:'@goto ',joinLabel.
+            s nextPutLine:':',skipLabel.
+            s nextPutLine:'@echo "###################################"'.
+            s nextPutLine:'@echo "FOLDER MISSING: ',(packageID copyReplaceAll:$: with:$/),'"'.
+            s nextPutLine:'@echo "###################################"'.
+            (self nonMandatorySubProjects includes:packageID) ifTrue:[
+                s nextPutLine:'@REM exit /b 1'.
+                s nextPutLine:'@echo "subproject is not mandatory; continue."'.
+            ] ifFalse:[    
+                s nextPutLine:'exit /b 1'.
+            ].    
+            s nextPutLine:':',joinLabel.
+            s cr.
+        ]
     ]
 
     "Created: / 14-09-2006 / 18:40:09 / cg"
     "Modified: / 27-09-2011 / 19:36:12 / cg"
     "Modified: / 17-01-2017 / 16:32:45 / stefan"
+    "Modified: / 07-03-2019 / 17:30:46 / Claus Gittinger"
 !
 
 subProjectMingwmakeCalls
@@ -5063,6 +5080,7 @@
     ^ self subProjectMakeCallsUsing:'call vcmake %1 %2'.
 ! !
 
+
 !ProjectDefinition class methodsFor:'file templates'!
 
 autopackage_default_dot_apspec