Results 1 to 2 of 2
I have a Makefile something like this:
Code:
all: libfe libbe
libfe: ${ODIR}/${LIBFE}
libbe: ${ODIR}/${LIBBE}
Now.. I have to report those targets to our Build server where we can see ...
- 08-20-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
Is this the proper way to write Makefile? Please help
I have a Makefile something like this:
Now.. I have to report those targets to our Build server where we can see the logs if the target is failed. So we have some utilities report_begin and report_end which we are calling from another Makefile called Makefile.rep. and I have to prepend and append these two targets in the main Makefile.Code:all: libfe libbe libfe: ${ODIR}/${LIBFE} libbe: ${ODIR}/${LIBBE}
Here is the Makefile.rep
Code:report_begin: begin_utility -target=$TARGET -server=server report_end: end_utility -target=$TARGET -server=server
I modified the main Makefile in this fashion:
Here when I do make all, it calls report_begin and report_end only for first target i.e libfe. and not for libbe. I don;t know why. May be make feels that there is no need to build targets report_begin and report_end.. But I have to call them everytime. Is there any way?Code:all: libfe libbe libfe: TARGET=libfe libfe: report_begin ${ODIR}/${LIBFE} report_end libbe: TARGET=libbe libbe: report_begin ${ODIR}/${LIBBE} report_end
So, I decided to change it the following way:
Is this the correct way to write the Makefile? Please help..Code:libfe: @make report_begin @make ${ODIR}/${LIBFE} @make report_end libfe: @make report_begin @make ${ODIR}/${LIBBE} @make report_end
- 08-20-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
Sorry.. I missed something in the last makefile:
Code:libfe: @make MODULE=libfe report_begin @make ${ODIR}/${LIBFE} @make MODULE=libfe report_end libbe: @make MODULE=libbe report_begin @make ${ODIR}/${LIBBE} @make MODULE=libbe report_end


Reply With Quote