Fixed empty build exception.
--- a/plugger.py Tue Feb 26 15:33:32 2008 +0100
+++ b/plugger.py Tue Feb 26 17:14:06 2008 +0100
@@ -196,7 +196,7 @@
}, ...]
@return: [(C_file_name, CFLAGS),...] , LDFLAGS_TO_APPEND
"""
- logger.write_warning(".".join(map(lambda x:str(x), self.GetCurrentLocation())) + " -> Nothing yo do\n")
+ logger.write_warning(".".join(map(lambda x:str(x), self.GetCurrentLocation())) + " -> Nothing to do\n")
return [],"",False
def _Generate_C(self, buildpath, locations, logger):
@@ -208,7 +208,7 @@
else:
LocationCFilesAndCFLAGS = []
- # plugin asks some some LDFLAGS
+ # plugin asks for some LDFLAGS
if PlugLDFLAGS:
# LDFLAGS can be either string
if type(PlugLDFLAGS)==type(str()):
@@ -880,6 +880,9 @@
C_files = [ fname for fname in result.splitlines() if fname[-2:]==".c" or fname[-2:]==".C" ]
# remove those that are not to be compiled because included by others
C_files.remove("POUS.c")
+ if not C_files:
+ logger.write_error("Error : At least one configuration and one ressource must be declared in PLC !\n")
+ return False
# transform those base names to full names with path
C_files = map(lambda filename:os.path.join(buildpath, filename), C_files)
logger.write("Extracting Located Variables...\n")