How to recompile the code when the header file changed?
Jiang Miao <[email protected]> Mon, 06 Oct 2008 04:25:03 +0800
| Newsgroups | gmane.comp.sysutils.bakefile.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is a test code in bakefile/tests/headers
After I run
bakefile -f msvc headers.bkl
nmake -f makefile.vc
bakefile works well.
I try to modify headers/test/hello.h
and run
nmake -f makefile.vc again
but nothing happened
and I found there is no header relation code in the file 'makefile.vc'
How to solve the problem? My bakefile version is 0.2.4
Thanks
JiangMiao
makefile.vc which bakefile generated:
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.4 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------
# C compiler
CC = cl
# Standard flags for CC
CFLAGS =
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS =
# Standard linker flags
LDFLAGS =
# [0,1]
BUILD_BOTH =
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
TESTLIB_CFLAGS = /MD /DWIN32 $(CPPFLAGS) $(CFLAGS)
TESTLIB_OBJECTS = \
testlib_hello.obj
TESTLIB2_CFLAGS = /MD /DWIN32 $(CPPFLAGS) $(CFLAGS)
TESTLIB2_OBJECTS = \
testlib2_hello.obj
TESTDLL_CFLAGS = /MD /DWIN32 /DMAKING_THE_DLL $(CPPFLAGS) $(CFLAGS)
TESTDLL_OBJECTS = \
testdll_hello.obj
TESTEXE_CFLAGS = /MD /DWIN32 $(CPPFLAGS) $(CFLAGS)
TESTEXE_OBJECTS = \
testexe_hello.obj
### Conditionally set variables: ###
!if "$(BUILD_BOTH)" == "1"
__testlib2___depname = testlib2.lib
!endif
### Targets: ###
all: testlib.lib $(__testlib2___depname) myDLL.dll testexe.exe
clean:
-if exist .\*.obj del .\*.obj
-if exist .\*.res del .\*.res
-if exist .\*.pch del .\*.pch
-if exist testlib.lib del testlib.lib
-if exist testlib2.lib del testlib2.lib
-if exist myDLL.dll del myDLL.dll
-if exist myDLL.ilk del myDLL.ilk
-if exist myDLL.pdb del myDLL.pdb
-if exist myLibrary.lib del myLibrary.lib
-if exist testexe.exe del testexe.exe
-if exist testexe.ilk del testexe.ilk
-if exist testexe.pdb del testexe.pdb
testlib.lib: $(TESTLIB_OBJECTS)
if exist $@ del $@
link /LIB /NOLOGO /OUT:$@ @<<
$(TESTLIB_OBJECTS)
<<
!if "$(BUILD_BOTH)" == "1"
testlib2.lib: $(TESTLIB2_OBJECTS)
if exist $@ del $@
link /LIB /NOLOGO /OUT:$@ @<<
$(TESTLIB2_OBJECTS)
<<
!endif
myDLL.dll: $(TESTDLL_OBJECTS)
link /DLL /NOLOGO /OUT:$@ $(LDFLAGS) @<<
$(TESTDLL_OBJECTS) /IMPLIB:myLibrary.lib
<<
testexe.exe: $(TESTEXE_OBJECTS)
link /NOLOGO /OUT:$@ $(LDFLAGS) @<<
$(TESTEXE_OBJECTS)
<<
testlib_hello.obj: .\hello.c
$(CC) /c /nologo /TC /Fo$@ $(TESTLIB_CFLAGS) .\hello.c
testlib2_hello.obj: .\hello.c
$(CC) /c /nologo /TC /Fo$@ $(TESTLIB2_CFLAGS) .\hello.c
testdll_hello.obj: .\hello.c
$(CC) /c /nologo /TC /Fo$@ $(TESTDLL_CFLAGS) .\hello.c
testexe_hello.obj: .\hello.c
$(CC) /c /nologo /TC /Fo$@ $(TESTEXE_CFLAGS) .\hello.c
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/