Fix make_errors.go.
It needs to be taught about modules that are split in two. Change-Id: Icbf32450eeba2255f40f37c72f1b569a0ebd3a96 Reviewed-on: https://boringssl-review.googlesource.com/15865 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
073391f7d6
commit
616c4c26e0
@ -90,6 +90,25 @@ func makeErrors(reset bool) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if filepath.Base(filepath.Dir(dirName)) == "fipsmodule" {
|
||||||
|
// Search the non-FIPS half of library for error codes as well.
|
||||||
|
extraPath := filepath.Join(topLevelPath, "crypto", lib+"_extra")
|
||||||
|
extraDir, err := os.Open(extraPath)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err == nil {
|
||||||
|
defer extraDir.Close()
|
||||||
|
extraFilenames, err := extraDir.Readdirnames(-1)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, extraFilename := range extraFilenames {
|
||||||
|
filenames = append(filenames, filepath.Join(extraPath, extraFilename))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, name := range filenames {
|
for _, name := range filenames {
|
||||||
if !strings.HasSuffix(name, ".c") {
|
if !strings.HasSuffix(name, ".c") {
|
||||||
continue
|
continue
|
||||||
@ -135,7 +154,7 @@ func findToplevel() (path string, err error) {
|
|||||||
buildingPath := filepath.Join(path, "BUILDING.md")
|
buildingPath := filepath.Join(path, "BUILDING.md")
|
||||||
|
|
||||||
_, err = os.Stat(buildingPath)
|
_, err = os.Stat(buildingPath)
|
||||||
if err != nil && os.IsNotExist(err) {
|
for i := 0; i < 2 && err != nil && os.IsNotExist(err); i++ {
|
||||||
path = filepath.Join("..", path)
|
path = filepath.Join("..", path)
|
||||||
buildingPath = filepath.Join(path, "BUILDING.md")
|
buildingPath = filepath.Join(path, "BUILDING.md")
|
||||||
_, err = os.Stat(buildingPath)
|
_, err = os.Stat(buildingPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user