Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the compilation and installation leave a lot of change files, this is confusing #5

Open
amtoine opened this issue Nov 29, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@amtoine
Copy link
Member

amtoine commented Nov 29, 2022

when ./building and ./installing the obnc tool, a lot of files are being created and deleted, which messes the git tree and creates a messy work tree...

the state of the modified files

after ./build --c-int-type=long --c-real-type=double

> git status --ignored --short
?? CONFIG
?? bin/obnc
?? bin/obnc-compile
?? bin/obnc-path
?? bin/obncdoc
?? lib/obnc/OBNCConfig.h
?? lib/obnc/OBNCTest
?? src/Config.h
?? src/obnc
?? src/obnc-compile
?? src/obnc-path
?? src/obncdoc
!! lib/obnc/OBNC.o
!! lib/obnc/OBNCTest.o
!! src/Clang.o
!! src/Config.o
!! src/Error.o
!! src/Files.o
!! src/Generate.o
!! src/Maps.o
!! src/ModulePaths.o
!! src/Paths.o
!! src/Range.o
!! src/StackTrace.o
!! src/Table.o
!! src/Time.o
!! src/Trees.o
!! src/Types.o
!! src/Util.o
!! src/lex.yy.o
!! src/obnc-compile.o
!! src/obnc-path.o
!! src/obnc.o
!! src/obncdoc.o
!! src/y.tab.o

and after sudo ./install

> git status --ignored --short
 D lib/obnc/obncdoc/Files.def
 D lib/obnc/obncdoc/Files.def.html
 D lib/obnc/obncdoc/FilesTest.def
 D lib/obnc/obncdoc/FilesTest.def.html
 D lib/obnc/obncdoc/In.def
 D lib/obnc/obncdoc/In.def.html
 D lib/obnc/obncdoc/InTest.def
 D lib/obnc/obncdoc/InTest.def.html
 D lib/obnc/obncdoc/Input.def
 D lib/obnc/obncdoc/Input.def.html
 D lib/obnc/obncdoc/Input0.def
 D lib/obnc/obncdoc/Input0.def.html
 D lib/obnc/obncdoc/Input0Test.def
 D lib/obnc/obncdoc/Input0Test.def.html
 D lib/obnc/obncdoc/InputTest.def
 D lib/obnc/obncdoc/InputTest.def.html
 D lib/obnc/obncdoc/Math.def
 D lib/obnc/obncdoc/Math.def.html
 D lib/obnc/obncdoc/MathTest.def
 D lib/obnc/obncdoc/MathTest.def.html
 D lib/obnc/obncdoc/Out.def
 D lib/obnc/obncdoc/Out.def.html
 D lib/obnc/obncdoc/OutTest.def
 D lib/obnc/obncdoc/OutTest.def.html
 D lib/obnc/obncdoc/Strings.def
 D lib/obnc/obncdoc/Strings.def.html
 D lib/obnc/obncdoc/StringsTest.def
 D lib/obnc/obncdoc/StringsTest.def.html
 D lib/obnc/obncdoc/XYplane.def
 D lib/obnc/obncdoc/XYplane.def.html
 D lib/obnc/obncdoc/XYplaneTest.def
 D lib/obnc/obncdoc/XYplaneTest.def.html
 D lib/obnc/obncdoc/index.html
 D lib/obnc/obncdoc/style.css
?? CONFIG
?? bin/obnc
?? bin/obnc-compile
?? bin/obnc-path
?? bin/obncdoc
?? lib/obnc/FilesTest
?? lib/obnc/InTest
?? lib/obnc/Input0Test
?? lib/obnc/MathTest
?? lib/obnc/OBNCConfig.h
?? lib/obnc/OBNCTest
?? lib/obnc/OutTest
?? lib/obnc/StringsTest
?? src/Config.h
?? src/obnc
?? src/obnc-compile
?? src/obnc-path
?? src/obncdoc
!! lib/obnc/OBNC.o
!! lib/obnc/OBNCTest.o
!! src/Clang.o
!! src/Config.o
!! src/Error.o
!! src/Files.o
!! src/Generate.o
!! src/Maps.o
!! src/ModulePaths.o
!! src/Paths.o
!! src/Range.o
!! src/StackTrace.o
!! src/Table.o
!! src/Time.o
!! src/Trees.o
!! src/Types.o
!! src/Util.o
!! src/lex.yy.o
!! src/obnc-compile.o
!! src/obnc-path.o
!! src/obnc.o
!! src/obncdoc.o
!! src/y.tab.o

this is quite a mess...

what already works

at that stage of the compilation of obnc, a single ./build clean leaves only the obncdoc files 👌

> ./build clean
> git status --ignored --short
 D lib/obnc/obncdoc/Files.def
 D lib/obnc/obncdoc/Files.def.html
 D lib/obnc/obncdoc/FilesTest.def
 D lib/obnc/obncdoc/FilesTest.def.html
 D lib/obnc/obncdoc/In.def
 D lib/obnc/obncdoc/In.def.html
 D lib/obnc/obncdoc/InTest.def
 D lib/obnc/obncdoc/InTest.def.html
 D lib/obnc/obncdoc/Input.def
 D lib/obnc/obncdoc/Input.def.html
 D lib/obnc/obncdoc/Input0.def
 D lib/obnc/obncdoc/Input0.def.html
 D lib/obnc/obncdoc/Input0Test.def
 D lib/obnc/obncdoc/Input0Test.def.html
 D lib/obnc/obncdoc/InputTest.def
 D lib/obnc/obncdoc/InputTest.def.html
 D lib/obnc/obncdoc/Math.def
 D lib/obnc/obncdoc/Math.def.html
 D lib/obnc/obncdoc/MathTest.def
 D lib/obnc/obncdoc/MathTest.def.html
 D lib/obnc/obncdoc/Out.def
 D lib/obnc/obncdoc/Out.def.html
 D lib/obnc/obncdoc/OutTest.def
 D lib/obnc/obncdoc/OutTest.def.html
 D lib/obnc/obncdoc/Strings.def
 D lib/obnc/obncdoc/Strings.def.html
 D lib/obnc/obncdoc/StringsTest.def
 D lib/obnc/obncdoc/StringsTest.def.html
 D lib/obnc/obncdoc/XYplane.def
 D lib/obnc/obncdoc/XYplane.def.html
 D lib/obnc/obncdoc/XYplaneTest.def
 D lib/obnc/obncdoc/XYplaneTest.def.html
 D lib/obnc/obncdoc/index.html
 D lib/obnc/obncdoc/style.css

strangely enough, ./build clean-all does not clean these files but adds

 D src/lex.yy.c
 D src/lex.yy.h
 D src/y.tab.c
 D src/y.tab.h

to the git status 🤔
and ./building again leaves the git status below, i.e. it modifies the files again... very confusing 😕

> git status --ignored --short
 D lib/obnc/obncdoc/Files.def
 D lib/obnc/obncdoc/Files.def.html
 D lib/obnc/obncdoc/FilesTest.def
 D lib/obnc/obncdoc/FilesTest.def.html
 D lib/obnc/obncdoc/In.def
 D lib/obnc/obncdoc/In.def.html
 D lib/obnc/obncdoc/InTest.def
 D lib/obnc/obncdoc/InTest.def.html
 D lib/obnc/obncdoc/Input.def
 D lib/obnc/obncdoc/Input.def.html
 D lib/obnc/obncdoc/Input0.def
 D lib/obnc/obncdoc/Input0.def.html
 D lib/obnc/obncdoc/Input0Test.def
 D lib/obnc/obncdoc/Input0Test.def.html
 D lib/obnc/obncdoc/InputTest.def
 D lib/obnc/obncdoc/InputTest.def.html
 D lib/obnc/obncdoc/Math.def
 D lib/obnc/obncdoc/Math.def.html
 D lib/obnc/obncdoc/MathTest.def
 D lib/obnc/obncdoc/MathTest.def.html
 D lib/obnc/obncdoc/Out.def
 D lib/obnc/obncdoc/Out.def.html
 D lib/obnc/obncdoc/OutTest.def
 D lib/obnc/obncdoc/OutTest.def.html
 D lib/obnc/obncdoc/Strings.def
 D lib/obnc/obncdoc/Strings.def.html
 D lib/obnc/obncdoc/StringsTest.def
 D lib/obnc/obncdoc/StringsTest.def.html
 D lib/obnc/obncdoc/XYplane.def
 D lib/obnc/obncdoc/XYplane.def.html
 D lib/obnc/obncdoc/XYplaneTest.def
 D lib/obnc/obncdoc/XYplaneTest.def.html
 D lib/obnc/obncdoc/index.html
 D lib/obnc/obncdoc/style.css
 M src/lex.yy.c
 M src/lex.yy.h
 M src/y.tab.c
 M src/y.tab.h
?? CONFIG
?? bin/obnc
?? bin/obnc-compile
?? bin/obnc-path
?? bin/obncdoc
?? lib/obnc/OBNCConfig.h
?? lib/obnc/OBNCTest
?? src/Config.h
?? src/obnc
?? src/obnc-compile
?? src/obnc-path
?? src/obncdoc
!! lib/obnc/OBNC.o
!! lib/obnc/OBNCTest.o
!! src/Clang.o
!! src/Config.o
!! src/Error.o
!! src/Files.o
!! src/Generate.o
!! src/Maps.o
!! src/ModulePaths.o
!! src/Paths.o
!! src/Range.o
!! src/StackTrace.o
!! src/Table.o
!! src/Time.o
!! src/Trees.o
!! src/Types.o
!! src/Util.o
!! src/lex.yy.o
!! src/obnc-compile.o
!! src/obnc-path.o
!! src/obnc.o
!! src/obncdoc.o
!! src/y.tab.o

the proposition

  • do not track files modified by the ./building
  • ignore files created by the ./building and delete them when ./build cleaning the repo
@amtoine amtoine added the bug Something isn't working label Nov 29, 2022
@amtoine
Copy link
Member Author

amtoine commented Nov 29, 2022

in order to clean the work tree completely, i need to run

> ./build clean
> git clean -df
> git reset --hard

which is a bit too much each time one wants to clean the local repo 🤔

@amtoine
Copy link
Member Author

amtoine commented Nov 29, 2022

NOTE

> ./build clean

is enough to revert a ./build ... without an ./install 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant