X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=run.go;h=8ea91d1eb9ca10d5789cd5cd9159c6c9aeb715f4;hb=HEAD;hp=3fd4168eef99a4f1feae35302af8abac03157d2e;hpb=c252c75d3f44eac7ea7e88a062e41201cb2997e1;p=goredo.git diff --git a/run.go b/run.go index 3fd4168..8ea91d1 100644 --- a/run.go +++ b/run.go @@ -1,19 +1,17 @@ -/* -goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2023 Sergey Matveev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// goredo -- djb's redo implementation on pure Go +// Copyright (C) 2020-2024 Sergey Matveev +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Targets runner @@ -289,9 +287,11 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error { if StopIfMod { return fmt.Errorf("%s externally modified", tgt) } + Jobs.Add(1) tracef(CWarn, "%s externally modified: not redoing", tgt) go func() { errs <- nil + Jobs.Done() }() return nil } @@ -557,7 +557,7 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error { } w := bufio.NewWriter(fdStderr) - { + if !fdDepExists { var ifchanges []string ifchanges, err = depReadOnlyIfchanges(tgt.dep) if err != nil {