Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 992011ea authored by LaMont Jones's avatar LaMont Jones
Browse files

Always write makefile for ${TARGET_RELEASE}

When writing all makefiles, we also need to write the makefile for
${TARGET_RELEASE}.  We can skip writing it a second time if it is not
an alias.

Bug: 328495189
Test: manual, TH
Change-Id: Ia5d1955f419312c76eb9c8a33b1c8a6bcc5efe0b
parent d02d7105
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -83,19 +83,23 @@ func main() {
		// We were told to guard operation and either we have no build flag, or it is False.
		// Write an empty file so that release_config.mk will use the old process.
		os.WriteFile(makefilePath, []byte{}, 0644)
	} else if allMake {
		return
	}
	// Write the makefile where release_config.mk is going to look for it.
	err = configs.WriteMakefile(makefilePath, targetRelease)
	if err != nil {
		panic(err)
	}
	if allMake {
		// Write one makefile per release config, using the canonical release name.
		for k, _ := range configs.ReleaseConfigs {
			if k != targetRelease {
				makefilePath = filepath.Join(outputDir, fmt.Sprintf("release_config-%s-%s.mk", product, k))
				err = configs.WriteMakefile(makefilePath, k)
				if err != nil {
					panic(err)
				}
			}
	} else {
		err = configs.WriteMakefile(makefilePath, targetRelease)
		if err != nil {
			panic(err)
		}
	}
	if json {