diff options
| author | Greg Hudson <ghudson@mit.edu> | 2010-11-28 01:36:42 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2010-11-28 01:36:42 +0000 |
| commit | 505ae39e1f5ef32013b0e95ff487de28663680cf (patch) | |
| tree | 34c0858af3f8934170366fcbc1f2e6744be37041 /src/config | |
| parent | d5160f60f49585a6208c9107f9a65a7fdc2087ba (diff) | |
| download | krb5-505ae39e1f5ef32013b0e95ff487de28663680cf.tar.gz krb5-505ae39e1f5ef32013b0e95ff487de28663680cf.tar.xz krb5-505ae39e1f5ef32013b0e95ff487de28663680cf.zip | |
Use for loops for recursion in the Windows build, cutting down on the
verbiage in Makefile.in files. For correctness of output, every
Makefile.in mydir= definition is changed to use $(S) instead of /.
ticket: 6826
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24536 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/win-post.in | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/src/config/win-post.in b/src/config/win-post.in index 151fac687..6046e627e 100644 --- a/src/config/win-post.in +++ b/src/config/win-post.in @@ -34,7 +34,36 @@ Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post. $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile !endif -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +# Recurse into subdirs if WINSUBDIRS or SUBDIRS is defined. Makefiles +# can depend on all-recurse, clean-recurse, or check-recurse to perform +# actions after recursion. +!if defined(SUBDIRS) && !defined(WINSUBDIRS) +WINSUBDIRS=$(SUBDIRS) +!endif +!ifdef WINSUBDIRS + +all-recurse: + @for %d in ($(WINSUBDIRS)) do @(echo Making in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) && popd) || exit 1 + @echo Making in $(mydir) +all-windows:: all-recurse + +clean-recurse:: + @for %d in ($(WINSUBDIRS)) do @(echo Making clean in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) clean && popd) || exit 1 + @echo Making clean in $(mydir) +clean-windows:: clean-recurse + +check-recurse:: + @for %d in ($(WINSUBDIRS)) do @(echo Making check in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) check && popd) || exit 1 + @echo Making check in $(mydir) +check-windows:: check-recurse + +!endif # WINSUBDIRS + +# Use 64-bit LIBNAME and OBJFILE on 64-bit platforms, if defined. +!if ("$(CPU)" == "IA64") || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64") !if defined(WIN64LIBNAME) LIBNAME=$(WIN64LIBNAME) !endif @@ -43,6 +72,7 @@ OBJFILE=$(WIN64OBJFILE) !endif !endif +# Build a library if LIBNAME is defined. !if defined(LIBNAME) !if !defined(OBJFILELIST) @@ -59,6 +89,7 @@ $(LIBNAME): $(OBJFILEDEP) !endif # LIBNAME +# Build an object file list if OBJFILE is defined. !if defined(OBJFILE) all-windows:: $(OBJFILE) !if defined(LIBOBJS) @@ -76,17 +107,6 @@ $(OBJFILE): $(LIBOBJS) check:: check-windows:: -!if defined(LIBNAME) -clean-windows:: -# NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR... -# if exist $(LIBNAME) del $(LIBNAME) -!endif -!if defined(OBJFILE) -clean-windows:: -# NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR... -# if exist $(OBJFILE) del $(OBJFILE) -!endif - clean-windows:: clean-windows-files clean-windows-dir |
