# HG changeset patch # User etisserant # Date 1204042446 -3600 # Node ID 9ffdac9cf609900674a70e1a640c609c65db10b5 # Parent 2e3d8d4480e7d57e6087cc917ccd51080cf464a3 Fixed empty build exception. diff -r 2e3d8d4480e7 -r 9ffdac9cf609 plugger.py --- 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")