Open kozross opened 7 years ago
It sounds like this is the same as issue #313 - is that correct? Or do you think it's a separate problem? I reproduced your Tupfiles locally and made some stub .c files, but I'm having trouble reproducing it similar to that other issue.
I don't know what to think - I'm merely reporting what I'm seeing. Whether these are related or not is a mystery to me.
I have the same issue, Tupfile:
.gitignore
CXXFLAGS += -Iinclude -I.
CXXFLAGS += -Wall
CXXFLAGS += -g
: foreach client/*.cpp common/*.cpp |> g++ $(CXXFLAGS) -DCLIENT -Iclient -c %f -o %o |> client/%B.o
: client/*.o |> g++ %f -o %o -lpthread -lglfw -lGL -lGLU -lpng |> bin/client
: foreach server/*.cpp common/*.cpp |> g++ $(CXXFLAGS) -DSERVER -Iserver -c %f -o %o |> server/%B.o
: server/*.o |> g++ %f -o %o -lpthread |> bin/server
and I'm getting all the object files in git.
Maybe its related to this warning I'm getting?
$ tup
tup warning: unshare(CLONE_NEWUSER) failed, and tup is not privileged. Subprocesses will have '.tup/mnt' paths for the current working directory and some dependencies may be missed.
tup is aware that they are generated though, if i remove them and run tup i see warnings like:
tup warning: generated file 'server/main.o' was deleted outside of tup. This file may be re-created on the next update.
I'm experiencing this error with tup 0.7.6
where cpp/*.o
does not appear in the generated .gitignore.
Tupfile:
.gitignore
CXX = g++
CXXFLAGS += -std=c++11
CXXFLAGS += -O2 -g -c
CXXFLAGS += -Wall -Wextra -Werror
CXXFLAGS += -pedantic -pedantic-errors
: foreach cpp/*.cpp |> $(CXX) $(CXXFLAGS) %f -o %o |> cpp/%B.o
: cpp/*.o |> $(CXX) %f -o %o |> cpp/Main.exe
It may be related to globbing files from sub-folders? If I add touch something.cpp and add a rule:
: foreach *.cpp |> $(CXX) $(CXXFLAGS) %f -o %o |> %B.o
/something.o
does appear in the generated .gitignore.
I have the following tup-related files:
As far as I understand it, because
main.rel.o, main, tags
are the targets of tup rules, they should be added to the top-level.gitignore
file. However, they're not there. Am I missing something obvious?