Patch from Richard Basch to work around Solaris 8 lacking isblank()
[krb5.git] / src / config / win-post.in
1 #
2 # Start of Win32 post-config lines (config/win-post.in)
3 #
4
5 setup-msg::
6         @set C_RULE_PRINT=      $(C_RULE_PRINT)
7         @set DO_C_RULE_PRINT=1
8
9 !if defined(NO_OUTPRE) || defined(NO_OUTDIR)
10 outpre-dir::
11 !else
12 outpre-dir:: $(OUTPRE3)$(DIRNUL)
13 !endif
14
15 #
16 # put all:: first just in case no other rules occur here
17 #
18 all::
19
20 #
21 # Set the #define to indicate that we are compiling a DLL.  We default to 
22 # compiling the Kerberos library
23 #
24 !if defined(DLL_EXP_TYPE)
25 DLL_FILE_DEF=/D$(DLL_EXP_TYPE)_DLL_FILE
26 !else
27 DLL_FILE_DEF=/DKRB5_DLL_FILE
28 !endif
29
30 # Build the Makefile unless we are in the top-level
31 #(where there is already an explicit rule).
32 !if !defined(ZIP) && !defined(WINFILES)
33 Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post.in
34         $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile
35 !endif
36
37 # Recurse into subdirs if WINSUBDIRS or SUBDIRS is defined.  Makefiles
38 # can depend on all-recurse, clean-recurse, or check-recurse to perform
39 # actions after recursion.
40 !if defined(SUBDIRS) && !defined(WINSUBDIRS)
41 WINSUBDIRS=$(SUBDIRS)
42 !endif
43 !ifdef WINSUBDIRS
44
45 all-recurse:
46         @for %d in ($(WINSUBDIRS)) do @(echo Making in $(mydir)\%d && \
47                 pushd %d && $(MAKE) -$(MFLAGS) && popd) || exit 1
48         @echo Making in $(mydir)
49 all-windows:: all-recurse
50
51 clean-recurse::
52         @for %d in ($(WINSUBDIRS)) do @(echo Making clean in $(mydir)\%d && \
53                 pushd %d && $(MAKE) -$(MFLAGS) clean && popd) || exit 1
54         @echo Making clean in $(mydir)
55 clean-windows:: clean-recurse
56
57 check-recurse::
58         @for %d in ($(WINSUBDIRS)) do @(echo Making check in $(mydir)\%d && \
59                 pushd %d && $(MAKE) -$(MFLAGS) check && popd) || exit 1
60         @echo Making check in $(mydir)
61 check-windows:: check-recurse
62
63 !endif # WINSUBDIRS
64
65 # Use 64-bit LIBNAME and OBJFILE on 64-bit platforms, if defined.
66 !if ("$(CPU)" == "IA64") || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64")
67 !if defined(WIN64LIBNAME)
68 LIBNAME=$(WIN64LIBNAME)
69 !endif
70 !if defined(WIN64OBJFILE)
71 OBJFILE=$(WIN64OBJFILE)
72 !endif
73 !endif
74
75 # Build a library if LIBNAME is defined.
76 !if defined(LIBNAME)
77
78 !if !defined(OBJFILELIST)
79 OBJFILELIST=@$(OBJFILE)
80 !endif
81 !if !defined(OBJFILEDEP)
82 OBJFILEDEP=$(OBJFILE)
83 !endif
84
85 all-windows:: $(LIBNAME)
86 $(LIBNAME): $(OBJFILEDEP)
87         $(LIBCMD) /out:$(LIBNAME) /nologo $(OBJFILELIST)
88
89 !endif # LIBNAME
90
91
92 # Build an object file list if OBJFILE is defined.
93 !if defined(OBJFILE)
94 all-windows:: $(OBJFILE)
95 !if defined(LIBOBJS)
96 $(OBJFILE): $(LIBOBJS)
97         if exist $(OBJFILE) del $(OBJFILE)
98 !if defined(PREFIXDIR)
99         $(LIBECHO) -p $(PREFIXDIR)\ $** > $(OBJFILE)
100 !else
101         $(LIBECHO) $** > $(OBJFILE)
102 !endif # !PREFIXDIR
103 !endif # LIBOBJS
104 !endif # OBJFILE
105
106
107 check::
108 check-windows::
109
110 clean-windows:: clean-windows-files clean-windows-dir
111
112
113 # This needs to be in the post because we need RM to be defined in terms
114 # of BUILDTOP
115 clean-windows-files::
116 !if "$(OUTPRE3)" == ""
117 !error ASSERTION FAILURE: OUTPRE3 must be defined!!!
118 !endif
119 !if "$(OS)" == "Windows_NT"
120         @if exist $(OUTPRE3)$(DIRNUL) rd /s/q $(OUTPRE3)
121 !else
122         @if exist $(OUTPRE3)$(DIRNUL) deltree /y $(OUTPRE3)
123 !endif
124 !if 0
125         $(RM) .\$(OUTPRE)*.obj .\$(OUTPRE)*.res
126         $(RM) .\$(OUTPRE)*.exe .\$(OUTPRE)*.dll
127         $(RM) .\$(OUTPRE)*.lib .\$(OUTPRE)*.pdb
128         $(RM) .\$(OUTPRE)*.exp .\$(OUTPRE)*.map
129         $(RM) .\$(OUTPRE)*.idb .\$(OUTPRE)*.ilk
130         $(RM) .\$(OUTPRE)*.manifest
131 !endif
132
133 # Dependencies
134 !if exist($(srcdir)/deps)
135 !include $(srcdir)/deps
136 !endif