The application discloses an automatic generation method of a compilation configuration file, and at least comprises the following steps: separating a to-be-compiled file and a compilation rule in a
software engineering, and generating a first compilation configuration file only comprising the compilation rule; searching the to-be-compiled file under a
directory tree where the
software engineering is located by using a pre-written compilation configuration file automatic generation tool; and saving the searched to-be-compiled file and the corresponding
directory in a second compilation configuration file in the form of a file
list and a
directory list respectively, wherein the second compilation configuration file is contained in the first compilation configuration file through a file containing instruction. The application further discloses a corresponding device, an electronic device and a storage medium. By implementing the application, the compilation configuration file can be automatically generated efficiently and at low cost.