|
From: | anonymous |
Subject: | [bug #29242] make fails to check timestamp of .h file and declares .o files are upto date |
Date: | Wed, 17 Mar 2010 07:13:10 +0000 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 |
URL: <http://savannah.gnu.org/bugs/?29242> Summary: make fails to check timestamp of .h file and declares .o files are upto date Project: make Submitted by: None Submitted on: Wed 17 Mar 2010 07:13:09 AM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: Follow the [STEP 1] to [STEP 5] to get the output. [STEP 1]:Create and edit test.h file as shown below. address@hidden example]#vi test.h #include<iostream> using namespace std; void PRINT() { cout<<"This is a test\n"; } ~ ~ ~ [STEP 2]: Create and edit test.cpp file as shown below. address@hidden example]# vi test.cpp #include "test.h" int main(){ PRINT(); return 0; } ~ ~ [STEP 3]: run make command as below (without creating any Makefile) address@hidden example]# make test.o g++ -c -o test.o test.cpp address@hidden example]# [STEP 4]:Edit test.h file and change the output text as below. address@hidden example]# vi test.h #include<iostream> using namespace std; void PRINT() { cout<<"test complete\n"; } ~ ~ ~ [STEP 5]: run make command again address@hidden example]# make test.o make: `test.o' is up to date. Expected: I was expecting the make tool to check the timestamp of both .h and .cpp and recompile .cpp to create .o files. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?29242> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |