dep.go | 8 ++++---- doc/cmds.texi | 2 +- doc/faq.texi | 4 ++-- doc/news.texi | 9 +++++++++ doc/state.texi | 2 +- ood.go | 4 ++-- run.go | 8 ++++---- t/goredo-deps.t | 2 +- usage.go | 2 +- diff --git a/dep.go b/dep.go index 653972c3995de029e89283c51920b0c01755b6f4a3d29cb186240a1497c5b460..fa9ca71fb3bcab52ec8132e2cd0b87b763eb62c8ada51b970d3a934bc2451add 100644 --- a/dep.go +++ b/dep.go @@ -159,7 +159,7 @@ return nil, err } depInfo := DepInfo{} if b := m["Build"]; b == "" { - return nil, errors.New(".dep missing Build:") + return nil, errors.New(".rec missing Build:") } else { depInfo.build = b } @@ -177,7 +177,7 @@ depInfo.always = true case DepTypeIfcreate: dep := m["Target"] if dep == "" { - return nil, errors.New("invalid format of .dep") + return nil, errors.New("invalid format of .rec") } depInfo.ifcreates = append(depInfo.ifcreates, dep) case DepTypeIfchange: @@ -186,11 +186,11 @@ depInfo.ifchanges = append(depInfo.ifchanges, m) case DepTypeStamp: hsh := m["Hash"] if hsh == "" { - return nil, errors.New("invalid format of .dep") + return nil, errors.New("invalid format of .rec") } depInfo.stamp = hsh default: - return nil, errors.New("invalid format of .dep") + return nil, errors.New("invalid format of .rec") } } return &depInfo, nil diff --git a/doc/cmds.texi b/doc/cmds.texi index 4aef55654486f0eab193ac713da79766d0d43c1c46394a7823f6fe1a9f5d4630..77382374c04e3becf99352a9a76b88d9fd7095f0bb94b2a22a25cc5027152ead 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -46,7 +46,7 @@ Dependency @url{https://en.wikipedia.org/wiki/DOT_(graph_description_language), DOT} graph generator. For example to visualize your dependencies with GraphViz: @example -$ redo target [...] # to assure that **/.redo/*.dep are filled up +$ redo target [...] # to assure that **/.redo/*.rec are filled up $ redo-dot target [...] > whatever.dot $ dot -Tpng whatever.dot > whatever.png # possibly add -Gsplines=ortho @end example diff --git a/doc/faq.texi b/doc/faq.texi index 5d9245898ee74730d405bdbb446d483d1401a972b0259f1eaf4b55cc6edc6efc..6e33b8aef1328d42a11e8e5bd92ccfc99cae076366d3916966f121f8682583a6 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -42,7 +42,7 @@ and transparently compressed, as ZFS with LZ4/Zstandard and Skein/BLAKE[23] algorithms demonstrate us. @command{goredo} includes @command{redo-stamp}, that really records the -stamp in the @file{.dep} file, but it does not play any role later. It +stamp in the @file{.rec} file, but it does not play any role later. It is stayed just for compatibility. @section Can removed .do lead to permanent errors of its non existence? @@ -52,7 +52,7 @@ assume that @file{.do}-less target now is an ordinary source-file? I have no confidence in such behaviour. So it is user's decision how to deal with it, probably it was just his inaccuracy mistake. If you really want to get rid of that dependency knowledge for @file{foo/bar} target, -then just remove @file{foo/.redo/bar.dep}. +then just remove @file{foo/.redo/bar.rec}. @section Does redo-always always rebuilds target? diff --git a/doc/news.texi b/doc/news.texi index 8412e026ec264b73a9c6a3606411546128c8264cda02da7487b865328d0af8cd..44fca6e2609c4422edbf7c7cb7a6f924edcbd5851076497a10ea2d452e9030d8 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -1,6 +1,15 @@ @node News @unnumbered News +@anchor{Release 1.2.0} +@section Release 1.2.0 +@itemize +@item + Dependency files @file{.dep} extension changed to @file{.rec}, to + reflect its recfile format nature and editors file type better + determination. +@end itemize + @anchor{Release 1.1.0} @section Release 1.1.0 @itemize diff --git a/doc/state.texi b/doc/state.texi index d47d9de219edd3ff8a7dd86abfc68c8a05fcdde5e8fa6b37146decc4d967b2c5..22aef6c2a8381a7e9c45acea1d08175b4ba346ecf7c9b3e34f5b0e3ef41e64d9 100644 --- a/doc/state.texi +++ b/doc/state.texi @@ -3,7 +3,7 @@ @unnumbered State Dependency and build state is kept inside @file{.redo} subdirectory in each directory related the build. Each corresponding target has its own, -recreated with every rebuild, @file{.dep} file. It is +recreated with every rebuild, @file{.rec} file. It is @url{https://www.gnu.org/software/recutils/, recfile}, that could have various dependency information. For example: diff --git a/ood.go b/ood.go index 2af03a627b3d6c5f1754e1b0df941716f5e4741ba4de9bfd6de4039ad68f6263..ca7e38fcca1b08dc8a9d9fa566141c4db59784c09ecccf5ec7c4993088b274e9 100644 --- a/ood.go +++ b/ood.go @@ -110,11 +110,11 @@ for _, m := range depInfo.ifchanges { dep := m["Target"] if dep == "" { - return ood, TgtErr{tgtOrig, errors.New("invalid format of .dep: missing Target")} + return ood, TgtErr{tgtOrig, errors.New("invalid format of .rec: missing Target")} } theirInode, err := inodeFromRec(m) if err != nil { - return ood, TgtErr{tgtOrig, fmt.Errorf("invalid format of .dep: %v", err)} + return ood, TgtErr{tgtOrig, fmt.Errorf("invalid format of .rec: %v", err)} } theirHsh := m["Hash"] trace(CDebug, "ood: %s%s -> %s: checking", indent, tgtOrig, dep) diff --git a/run.go b/run.go index fcd71083e35444f51f5312554ddb55210dc82798b2cc431eaf27ec86b4c3fd39..7207a29b096081bc9abaeff4b71dedc054b653ad6463f7c2774e803ee458cfd6 100644 --- a/run.go +++ b/run.go @@ -51,7 +51,7 @@ EnvNoSync = "REDO_NO_SYNC" RedoDir = ".redo" LockSuffix = ".lock" - DepSuffix = ".dep" + DepSuffix = ".rec" TmpPrefix = ".redo." LogSuffix = ".log" ) @@ -204,7 +204,7 @@ var depInfo *DepInfo fdDep, err := os.Open(path.Join(redoDir, tgt+DepSuffix)) if err != nil { if os.IsNotExist(err) { - err = errors.New("was not built: no .dep") + err = errors.New("was not built: no .rec") } goto Finish } @@ -240,7 +240,7 @@ }() return nil } - // Start preparing .dep + // Start preparing .rec fdDep, err := tempfile(redoDir, tgt+DepSuffix) if err != nil { lockRelease() @@ -542,7 +542,7 @@ goto Finish } } - // Commit .dep + // Commit .rec if !NoSync { err = fdDep.Sync() if err != nil { diff --git a/t/goredo-deps.t b/t/goredo-deps.t index 8ba3af3e156a468e8528da912bcee62f2848829c87314af835d694874ad2fc99..69c2384a0f7510f7721ff38749a9a1ec012eacdad4d767784d06819af5990e6e 100755 --- a/t/goredo-deps.t +++ b/t/goredo-deps.t @@ -28,7 +28,7 @@ test_expect_success Rebuild "redo-ifchange sub/index.html" stat2=`stat sub/index.html` test_expect_success "Was not rebuild" '[ "$stat1" = "$stat2" ]' -tgts=`sed -n "s/^Target: //p" sub/.redo/index.html.dep | sort` +tgts=`sed -n "s/^Target: //p" sub/.redo/index.html.rec | sort` tgts=`echo $tgts` tgts_expected="../default.html.do" # .do itself tgts_expected="$tgts_expected default.do" # ifcreate diff --git a/usage.go b/usage.go index e522f94e0440eab3cfb8c2c6159729fd4ea10b13e9146358f001a4d4d2ccf2de..9ad49630f9fcc208b71e627f90725ce1f53a56f93133dd42433b75e41d0306a4 100644 --- a/usage.go +++ b/usage.go @@ -26,7 +26,7 @@ "strings" ) const ( - Version = "1.1.0" + Version = "1.2.0" Warranty = `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.