summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-07-07 17:32:14 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-07-07 17:32:14 +0000
commit1f3787bd06fcfdbda05381f938cdf2862367d795 (patch)
tree64a0b5f748499432ae2933d66a291f704151fe21
parent596a7bc31ba0c33c8bbcb18a403fc179759ab8ca (diff)
downloadMPC-1f3787bd06fcfdbda05381f938cdf2862367d795.tar.gz
ChangeLogTag: Mon Jul 7 12:31:40 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/MakeWorkspaceCreator.pm2
-rw-r--r--templates/make.mpd12
2 files changed, 11 insertions, 3 deletions
diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm
index 99675f87..42bd851b 100644
--- a/modules/MakeWorkspaceCreator.pm
+++ b/modules/MakeWorkspaceCreator.pm
@@ -69,7 +69,7 @@ sub write_comps {
## Print out the projet Makefile
print $fh $crlf .
- "all clean realclean:$crlf";
+ "all clean depend realclean:$crlf";
## If there is more than one project, use a for loop
if ($#list > 0) {
diff --git a/templates/make.mpd b/templates/make.mpd
index 179c0cfb..d0eac06e 100644
--- a/templates/make.mpd
+++ b/templates/make.mpd
@@ -7,6 +7,7 @@ CXX = <%cxx%>
<%endfor%>
CCC = $(CXX)
MAKEFILE = <%project_file%>
+DEPENDENCIES = .depend.<%project_file%>
<%if(exename)%>
BIN = <%exename%>
<%endif%>
@@ -148,8 +149,7 @@ INSTARGET = $(LIB)
<%endif%>
install:
@mkdir -p "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>"
- @$(RM) "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>/$(INSTARGET)"
- @ln -s "$(PWD)/$(INSTARGET)" "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>"
+ @[ -f "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>/$(INSTARGET)" ] || ln -s "$(PWD)/$(INSTARGET)" "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>"
<%endif%>
<%endif%>
clean:
@@ -164,4 +164,12 @@ realclean: clean
#----------------------------------------------------------------------------
# Dependencies
#----------------------------------------------------------------------------
+
+$(DEPENDENCIES):
+ touch $(DEPENDENCIES)
+
+depend:
+ perl <%depgen("$(ACE_ROOT)/bin/depgen.pl")%> -t gnu<%foreach(includes)%> -I<%include%><%endfor%><%foreach(macros)%> -D<%macro%><%endfor%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f $(DEPENDENCIES)<%foreach(source_files)%> <%source_file%><%endfor%>
+
+include $(DEPENDENCIES)
<%marker(bottom)%>