Hi Henning, Yes, I feel something is missing . Actually, there is a cvs repository on the machine where this makefile 'Makefile_rm' lies . The path is represented by the keyword 'CVSROOT' used in 'Makefile_rm' . This cvs export command brings a copy of the specified file (either .h or .cpp ) from the cvs repository into my working directory . Once the dependency files are in my working directory, the compilation & thereafter linking is invoked . The command 'cvs update' will only let me see the status of the files in my working directory ( status can be M - modified, C - conflict, A - added, R - removed etc) . Now, Henning, can you please send me your feedback. I am attaching my makefile 'Makefile_rm' again.
Arpita . Henning Makholm wrote: > Scripsit ARPITA SAXENA <[EMAIL PROTECTED]> > > > I have made a makefile 'Makefile_rm' . While invoking it's all > > target, everything workis fine except that at the end an 'rm ' command > > is invoked for all the .cpp files using the '%.o' default rule . > > That sounds like the standard, documented, make behavior: If a file is > never mentioned by its complete name in any rule and it doesn't > already exist, make will deem it an "intermediate file" that you don't > really want to have lying around between makes. > > Look at the node "Chained Rules" in the make manual, or search for the > description ".PRECIOUS" pseudo-target. > > > $(MODULE)/src/%.h : $(CVSROOT)/$(MODULE)/src/%.h,v > > cvs export -r $(TAG) $@ > > touch $@ > > $(MODULE)/src/%.cpp : $(CVSROOT)/$(MODULE)/src/%.cpp,v > > cvs export -r $(TAG) $(MODULE)/src/$(*F).cpp > > touch $@ > > By the way, this looks like a really roundabout way of doing something > that could be accomplished just by saying > > all : cvs_update TlWsPPFend TlWsPPDaemon > .PHONY: cvs_update > cvs_update: > cvs update > > Or am I missing something? > > -- > Henning Makholm "I ... I have to return some videos."
CVSROOT=/subsyscvs/toolcms/toolcvs MODULE=privatepatch TAG=TEST_ARP SCRIPTS = TlWsBackupRestoreScript TlWsRestartTerminateScript TlWsSetEnvScript history status FRONTEND = pp_global.o ppFend_main.o ppFend_Reset.o ppFend_PatchInstall.o ppFend_PatchDeinstall.o ppFend_ExistingRestart.o DAEMON = pp_global.o ppDaemon_main.o ppDaemon_UpdateDaemon.o HLIST = pp_const.h pp_global.h ppFend_main.h ppDaemon_main.h all : TlWsPPFend TlWsPPDaemon $(MODULE)/src/%.h : $(CVSROOT)/$(MODULE)/src/%.h,v cvs export -r $(TAG) $@ touch $@ $(MODULE)/src/%.cpp : $(CVSROOT)/$(MODULE)/src/%.cpp,v cvs export -r $(TAG) $(MODULE)/src/$(*F).cpp touch $@ pp_global.o : $(MODULE)/src/pp_const.h $(MODULE)/src/pp_global.h $(MODULE)/src/pp_global.cpp g++ -c $(MODULE)/src/$(*F).cpp -o ./$@ -I ../../stl ppFend_main.o : $(MODULE)/src/ppFend_main.h $(MODULE)/src/ppFend_main.cpp g++ -c $(MODULE)/src/$(*F).cpp -o ./$@ -I ../../stl ppDaemon_main.o : $(MODULE)/src/ppDaemon_main.h $(MODULE)/src/ppDaemon_main.cpp g++ -c $(MODULE)/src/$(*F).cpp -o ./$@ -I ../../stl %.o : $(MODULE)/src/%.cpp g++ -c $(MODULE)/src/$(*F).cpp -o ./$@ -I ../../stl TlWsPPFend : $(FRONTEND) g++ -o TlWsPPFend $(FRONTEND) TlWsPPDaemon : $(DAEMON) g++ -o TlWsPPDaemon $(DAEMON) clean : FRONTEND_clean DAEMON_clean MODULE_clean FRONTEND_clean : rm TlWsPPFend DAEMON_clean : rm TlWsPPDaemon MODULE_clean : rm -Rf $(MODULE) rm -f *.o