2 ## Makefile for OpenSSL
4 ## {- join("\n## ", @autowarntext) -}
8 our $sover_dirname = platform->shlib_version_as_filename();
10 my $build_scheme = $target{build_scheme};
11 my $install_flavour = $build_scheme->[$#$build_scheme]; # last element
13 $install_flavour eq "VC-WOW" ? "ProgramFiles(x86)"
16 $install_flavour eq "VC-WOW" ? "CommonProgramFiles(x86)"
17 : "CommonProgramW6432";
18 our $win_installroot =
19 defined($ENV{$win_installenv}) ? $win_installenv : 'ProgramFiles';
21 defined($ENV{$win_commonenv}) ? $win_commonenv : 'CommonProgramFiles';
23 # expand variables early
24 $win_installroot = $ENV{$win_installroot};
25 $win_commonroot = $ENV{$win_commonroot};
27 # This makes sure things get built in the order they need
32 return "$target: build_generated\n\t\$(MAKE) /\$(MAKEFLAGS) depend\n\t\$(MAKE) /\$(MAKEFLAGS) _$target\n_$target";
37 PLATFORM={- $config{target} -}
38 SRCDIR={- $config{sourcedir} -}
39 BLDDIR={- $config{builddir} -}
40 FIPSKEY={- $config{FIPSKEY} -}
42 VERSION={- "$config{full_version}" -}
43 MAJOR={- $config{major} -}
44 MINOR={- $config{minor} -}
46 SHLIB_VERSION_NUMBER={- $config{shlib_version} -}
48 LIBS={- join(" ", map { ( platform->sharedlib_import($_), platform->staticlib($_) ) } @{$unified_info{libraries}}) -}
49 SHLIBS={- join(" ", map { platform->sharedlib($_) // () } @{$unified_info{libraries}}) -}
50 SHLIBPDBS={- join(" ", map { platform->sharedlibpdb($_) // () } @{$unified_info{libraries}}) -}
51 MODULES={- our @MODULES = map { platform->dso($_) } @{$unified_info{modules}};
52 join(" ", @MODULES) -}
53 MODULEPDBS={- join(" ", map { platform->dsopdb($_) } @{$unified_info{modules}}) -}
54 FIPSMODULENAME={- # We do some extra checking here, as there should be only one
57 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
58 && $unified_info{attributes}->{modules}->{$_}->{fips} }
59 @{$unified_info{modules}};
60 die "More that one FIPS module" if scalar @fipsmodules > 1;
61 join(" ", map { basename(platform->dso($_)) } @fipsmodules) -}
62 PROGRAMS={- our @PROGRAMS = map { platform->bin($_) } @{$unified_info{programs}}; join(" ", @PROGRAMS) -}
63 PROGRAMPDBS={- join(" ", map { $_.".pdb" } @{$unified_info{programs}}) -}
64 SCRIPTS={- our @SCRIPTS = @{$unified_info{scripts}}; join(" ", @SCRIPTS) -}
65 {- output_off() if $disabled{makedepend}; "" -}
66 DEPS={- join(" ", map { platform->isobj($_) ? platform->dep($_) : () }
67 grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
68 keys %{$unified_info{sources}}); -}
69 {- output_on() if $disabled{makedepend}; "" -}
70 GENERATED_MANDATORY={- our @GENERATED_MANDATORY = @{$unified_info{depends}->{""}};
71 join(" ", @GENERATED_MANDATORY) -}
72 GENERATED={- # common0.tmpl provides @generated
73 our @GENERATED = map { platform->convertext($_) } @generated;
74 join(" ", @GENERATED) -}
77 join(" ", map { quotify1(platform->sharedlib_import($_)
78 // platform->staticlib($_)) }
79 grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
80 @{$unified_info{libraries}})
83 join(" ", map { my $x = platform->sharedlib($_);
84 $x ? quotify_l($x) : () }
85 grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
86 @{$unified_info{libraries}})
89 join(" ", map { my $x = platform->sharedlibpdb($_);
90 $x ? quotify_l($x) : () }
91 grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
92 @{$unified_info{libraries}})
95 join(" ", map { quotify1(platform->dso($_)) }
96 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
97 && $unified_info{attributes}->{modules}->{$_}->{engine} }
98 @{$unified_info{modules}})
100 INSTALL_ENGINEPDBS={-
101 join(" ", map { quotify1(platform->dsopdb($_)) }
102 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
103 && $unified_info{attributes}->{modules}->{$_}->{engine} }
104 @{$unified_info{modules}})
107 join(" ", map { quotify1(platform->dso($_)) }
108 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
109 && $unified_info{attributes}->{modules}->{$_}->{fips} }
110 @{$unified_info{modules}})
113 join(" ", map { quotify1(platform->dso($_)) }
114 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
115 && !$unified_info{attributes}->{modules}->{$_}->{engine}
116 && !$unified_info{attributes}->{modules}->{$_}->{fips} }
117 @{$unified_info{modules}})
119 INSTALL_MODULEPDBS={-
120 join(" ", map { quotify1(platform->dsopdb($_)) }
121 grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
122 && !$unified_info{attributes}->{modules}->{$_}->{engine} }
123 @{$unified_info{modules}})
126 join(" ", map { quotify1(platform->bin($_)) }
127 grep { !$unified_info{attributes}->{programs}->{$_}->{noinst} }
128 @{$unified_info{programs}})
130 INSTALL_PROGRAMPDBS={-
131 join(" ", map { quotify1(platform->binpdb($_)) }
132 grep { !$unified_info{attributes}->{programs}->{$_}->{noinst} }
133 @{$unified_info{programs}})
136 join(" ", map { quotify1($_) }
137 grep { !$unified_info{attributes}->{scripts}->{$_}->{noinst}
138 && !$unified_info{attributes}->{scripts}->{$_}->{misc} }
139 @{$unified_info{scripts}})
142 join(" ", map { quotify1($_) }
143 grep { !$unified_info{attributes}->{scripts}->{$_}->{noinst}
144 && $unified_info{attributes}->{scripts}->{$_}->{misc} }
145 @{$unified_info{scripts}})
147 HTMLDOCS1={- our @HTMLDOCS1 = @{$unified_info{htmldocs}->{man1}};
148 join(" ", @HTMLDOCS1) -}
149 HTMLDOCS3={- our @HTMLDOCS3 = @{$unified_info{htmldocs}->{man3}};
150 join(" ", @HTMLDOCS3) -}
151 HTMLDOCS5={- our @HTMLDOCS5 = @{$unified_info{htmldocs}->{man5}};
152 join(" ", @HTMLDOCS5) -}
153 HTMLDOCS7={- our @HTMLDOCS7 = @{$unified_info{htmldocs}->{man7}};
154 join(" ", @HTMLDOCS7) -}
155 HTMLDOCS1_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS1;
156 join(' ', sort keys %dirs) -}
157 HTMLDOCS3_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS3;
158 join(' ', sort keys %dirs) -}
159 HTMLDOCS5_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS5;
160 join(' ', sort keys %dirs) -}
161 HTMLDOCS7_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS7;
162 join(' ', sort keys %dirs) -}
164 APPS_OPENSSL="{- use File::Spec::Functions;
165 catfile("apps","openssl") -}"
167 # Do not edit these manually. Use Configure with --prefix or --openssldir
168 # to change this! Short explanation in the top comment in Configure
169 INSTALLTOP_dev={- # $prefix is used in the OPENSSLDIR perl snippet
171 use File::Spec::Functions qw(:DEFAULT splitpath);
172 our $prefix = canonpath($config{prefix}
173 || "$win_installroot\\OpenSSL");
174 our ($prefix_dev, $prefix_dir, $prefix_file) =
175 splitpath($prefix, 1);
177 INSTALLTOP_dir={- canonpath($prefix_dir) -}
179 # The logic here is that if no --openssldir was given,
180 # OPENSSLDIR will get the value "$win_commonroot\\SSL".
181 # If --openssldir was given and the value is an absolute
182 # path, OPENSSLDIR will get its value without change.
183 # If the value from --openssldir is a relative path,
184 # OPENSSLDIR will get $prefix with the --openssldir
185 # value appended as a subdirectory.
187 use File::Spec::Functions qw(:DEFAULT splitpath);
189 $config{openssldir} ?
190 (file_name_is_absolute($config{openssldir}) ?
191 canonpath($config{openssldir})
192 : catdir($prefix, $config{openssldir}))
193 : canonpath("$win_commonroot\\SSL");
194 our ($openssldir_dev, $openssldir_dir, $openssldir_file) =
195 splitpath($openssldir, 1);
197 OPENSSLDIR_dir={- canonpath($openssldir_dir) -}
198 LIBDIR={- our $libdir = $config{libdir} || "lib";
199 file_name_is_absolute($libdir) ? "" : $libdir -}
200 MODULESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath catpath);
201 our $modulesprefix = catdir($prefix,$libdir);
202 our ($modulesprefix_dev, $modulesprefix_dir,
203 $modulesprefix_file) =
204 splitpath($modulesprefix, 1);
205 our $modulesdir_dev = $modulesprefix_dev;
206 our $modulesdir_dir =
207 catdir($modulesprefix_dir, "ossl-modules");
208 our $modulesdir = catpath($modulesdir_dev, $modulesdir_dir);
209 our $enginesdir_dev = $modulesprefix_dev;
210 our $enginesdir_dir =
211 catdir($modulesprefix_dir, "engines-$sover_dirname");
212 our $enginesdir = catpath($enginesdir_dev, $enginesdir_dir);
214 MODULESDIR_dir={- canonpath($modulesdir_dir) -}
215 ENGINESDIR_dev={- $enginesdir_dev -}
216 ENGINESDIR_dir={- canonpath($enginesdir_dir) -}
217 !IF "$(DESTDIR)" != ""
218 INSTALLTOP=$(DESTDIR)$(INSTALLTOP_dir)
219 OPENSSLDIR=$(DESTDIR)$(OPENSSLDIR_dir)
220 ENGINESDIR=$(DESTDIR)$(ENGINESDIR_dir)
221 MODULESDIR=$(DESTDIR)$(MODULESDIR_dir)
223 INSTALLTOP=$(INSTALLTOP_dev)$(INSTALLTOP_dir)
224 OPENSSLDIR=$(OPENSSLDIR_dev)$(OPENSSLDIR_dir)
225 ENGINESDIR=$(ENGINESDIR_dev)$(ENGINESDIR_dir)
226 MODULESDIR=$(MODULESDIR_dev)$(MODULESDIR_dir)
229 # $(libdir) is chosen to be compatible with the GNU coding standards
230 libdir={- file_name_is_absolute($libdir)
231 ? $libdir : '$(INSTALLTOP)\$(LIBDIR)' -}
233 ##### User defined commands and flags ################################
235 CC="{- $config{CC} -}"
236 CPP={- $config{CPP} -}
237 CPPFLAGS={- our $cppflags1 = join(" ",
238 (map { "-D".$_} @{$config{CPPDEFINES}}),
239 (map { " -I".$_} @{$config{CPPINCLUDES}}),
240 @{$config{CPPFLAGS}}) -}
241 CFLAGS={- join(' ', @{$config{CFLAGS}}) -}
242 LD="{- $config{LD} -}"
243 LDFLAGS={- join(' ', @{$config{LDFLAGS}}) -}
244 EX_LIBS={- join(' ', @{$config{LDLIBS}}) -}
246 PERL={- $config{PERL} -}
248 AR="{- $config{AR} -}"
249 ARFLAGS= {- join(' ', @{$config{ARFLAGS}}) -}
251 MT="{- $config{MT} -}"
252 MTFLAGS= {- join(' ', @{$config{MTFLAGS}}) -}
254 AS="{- $config{AS} -}"
255 ASFLAGS={- join(' ', @{$config{ASFLAGS}}) -}
257 RC="{- $config{RC} -}"
258 RCFLAGS={- join(' ', @{$config{RCFLAGS}}) -}
260 ECHO="$(PERL)" "$(SRCDIR)\util\echo.pl"
262 ##### Special command flags ##########################################
264 COUTFLAG={- $target{coutflag} -}$(OSSL_EMPTY)
265 LDOUTFLAG={- $target{ldoutflag} -}$(OSSL_EMPTY)
266 AROUTFLAG={- $target{aroutflag} -}$(OSSL_EMPTY)
267 MTINFLAG={- $target{mtinflag} -}$(OSSL_EMPTY)
268 MTOUTFLAG={- $target{mtoutflag} -}$(OSSL_EMPTY)
269 ASOUTFLAG={- $target{asoutflag} -}$(OSSL_EMPTY)
270 RCOUTFLAG={- $target{rcoutflag} -}$(OSSL_EMPTY)
272 ##### Project flags ##################################################
274 # Variables starting with CNF_ are common variables for all product types
276 CNF_ASFLAGS={- join(' ', $target{asflags} || (),
277 @{$config{asflags}}) -}
278 CNF_CPPFLAGS={- our $cppfags2 =
279 join(' ', $target{cppflags} || (),
280 (map { '-D'.quotify1($_) } @{$target{defines}},
281 @{$config{defines}}),
282 (map { '-I'.'"'.$_.'"' } @{$target{includes}},
283 @{$config{includes}}),
284 @{$config{cppflags}}) -}
285 CNF_CFLAGS={- join(' ', $target{cflags} || (),
286 @{$config{cflags}}) -}
287 CNF_CXXFLAGS={- join(' ', $target{cxxflags} || (),
288 @{$config{cxxflags}}) -}
289 CNF_LDFLAGS={- join(' ', $target{lflags} || (),
290 @{$config{lflags}}) -}
291 CNF_EX_LIBS={- join(' ', $target{ex_libs} || (),
292 @{$config{ex_libs}}) -}
294 # Variables starting with LIB_ are used to build library object files
295 # and shared libraries.
296 # Variables starting with DSO_ are used to build DSOs and their object files.
297 # Variables starting with BIN_ are used to build programs and their object
300 LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (),
301 @{$config{lib_asflags}},
302 '$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
303 LIB_CPPFLAGS={- our $lib_cppflags =
304 join(' ', $target{lib_cppflags} || (),
305 $target{shared_cppflag} || (),
306 (map { '-D'.quotify1($_) }
307 @{$target{lib_defines}},
308 @{$target{shared_defines}},
309 @{$config{lib_defines}},
310 @{$config{shared_defines}}),
311 (map { '-I'.quotify1($_) }
312 @{$target{lib_includes}},
313 @{$target{shared_includes}},
314 @{$config{lib_includes}},
315 @{$config{shared_includes}}),
316 @{$config{lib_cppflags}},
317 @{$config{shared_cppflag}});
318 join(' ', $lib_cppflags,
319 (map { '-D'.quotify1($_) }
320 "OPENSSLDIR=\"$openssldir\"",
321 "ENGINESDIR=\"$enginesdir\"",
322 "MODULESDIR=\"$modulesdir\""),
323 '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
324 LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
325 $target{shared_cflag} || (),
326 @{$config{lib_cflags}},
327 @{$config{shared_cflag}},
328 '$(CNF_CFLAGS)', '$(CFLAGS)') -}
329 LIB_LDFLAGS={- join(' ', $target{shared_ldflag} || (),
330 $config{shared_ldflag} || (),
331 '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
332 LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
333 DSO_ASFLAGS={- join(' ', $target{dso_asflags} || (),
334 $target{module_asflags} || (),
335 @{$config{dso_asflags}},
336 @{$config{module_asflags}},
337 '$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
338 DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (),
339 $target{module_cppflag} || (),
340 (map { '-D'.quotify1($_) }
341 @{$target{dso_defines}},
342 @{$target{module_defines}},
343 @{$config{dso_defines}},
344 @{$config{module_defines}}),
345 (map { '-I'.quotify1($_) }
346 @{$target{dso_includes}},
347 @{$target{module_includes}},
348 @{$config{dso_includes}},
349 @{$config{module_includes}}),
350 @{$config{dso_cppflags}},
351 @{$config{module_cppflags}},
352 '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
353 DSO_CFLAGS={- join(' ', $target{dso_cflags} || (),
354 $target{module_cflags} || (),
355 @{$config{dso_cflags}},
356 @{$config{module_cflags}},
357 '$(CNF_CFLAGS)', '$(CFLAGS)') -}
358 DSO_LDFLAGS={- join(' ', $target{dso_lflags} || (),
359 $target{module_ldflags} || (),
360 @{$config{dso_lflags}},
361 @{$config{module_ldflags}},
362 '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
363 DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
364 BIN_ASFLAGS={- join(' ', $target{bin_asflags} || (),
365 @{$config{bin_asflags}},
366 '$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
367 BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (),
368 (map { '-D'.$_ } @{$config{bin_defines} || ()}),
369 @{$config{bin_cppflags}},
370 '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
371 BIN_CFLAGS={- join(' ', $target{bin_cflags} || (),
372 @{$config{bin_cflags}},
373 '$(CNF_CFLAGS)', '$(CFLAGS)') -}
374 BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
375 @{$config{bin_lflags}},
376 '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
377 BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
379 # CPPFLAGS_Q is used for one thing only: to build up buildinf.h
380 CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
381 $cppflags2 =~ s|([\\"])|\\$1|g;
382 join(' ', $lib_cppflags || (), $cppflags2 || (),
385 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
387 PROCESSOR= {- $config{processor} -}
389 # The main targets ###################################################
391 {- dependmagic('build_sw'); -}: build_libs_nodep build_modules_nodep build_programs_nodep copy-utils
392 {- dependmagic('build_libs'); -}: build_libs_nodep
393 {- dependmagic('build_modules'); -}: build_modules_nodep
394 {- dependmagic('build_programs'); -}: build_programs_nodep
396 build_docs: build_html_docs
397 build_html_docs: $(HTMLDOCS1) $(HTMLDOCS3) $(HTMLDOCS5) $(HTMLDOCS7)
399 build_generated: $(GENERATED_MANDATORY)
401 build_libs_nodep: $(LIBS) {- join(" ",map { platform->sharedlib_import($_) // () } @{$unified_info{libraries}}) -}
403 build_modules_nodep: $(MODULES)
405 build_programs_nodep: $(PROGRAMS) $(SCRIPTS)
408 # Kept around for backward compatibility
409 build_apps build_tests: build_programs
411 # Convenience target to prebuild all generated files, not just the mandatory
413 build_all_generated: $(GENERATED_MANDATORY) $(GENERATED) build_docs
414 @{- output_off() if $disabled{makedepend}; "" -}
415 @$(ECHO) "Warning: consider configuring with no-makedepend, because if"
416 @$(ECHO) " target system doesn't have $(PERL),"
417 @$(ECHO) " then make will fail..."
418 @{- output_on() if $disabled{makedepend}; "" -}
420 all: build_sw build_docs
423 {- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep copy-utils
424 @{- output_off() if $disabled{tests}; "" -}
425 cmd /C "set "SRCTOP=$(SRCDIR)" & set "BLDTOP=$(BLDDIR)" & set "PERL=$(PERL)" & set "FIPSKEY=$(FIPSKEY)" & "$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)"
426 @{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
427 @$(ECHO) "Tests are not supported with your chosen Configure options"
428 @{- output_on() if !$disabled{tests}; "" -}
431 @{- output_off() if $disabled{tests}; "" -}
432 @cmd /C "set "SRCTOP=$(SRCDIR)" & "$(PERL)" "$(SRCDIR)\test\run_tests.pl" list"
433 @{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
434 @$(ECHO) "Tests are not supported with your chosen Configure options"
435 @{- output_on() if !$disabled{tests}; "" -}
437 install: install_sw install_ssldirs install_docs
439 uninstall: uninstall_docs uninstall_sw
442 "$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """{.,apps,test,fuzz}/$$1.*"""; } @ARGV" $(SHLIBS)
443 -del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb
446 -rmdir /Q /S $(HTMLDOCS1_BLDDIRS)
447 -rmdir /Q /S $(HTMLDOCS3_BLDDIRS)
448 -rmdir /Q /S $(HTMLDOCS5_BLDDIRS)
449 -rmdir /Q /S $(HTMLDOCS7_BLDDIRS)
450 {- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -}
451 {- join("\n\t", map { "-del /Q /F $_" } @MODULES) -}
452 {- join("\n\t", map { "-del /Q /F $_" } @SCRIPTS) -}
453 {- join("\n\t", map { "-del /Q /F $_" } @GENERATED_MANDATORY) -}
454 {- join("\n\t", map { "-del /Q /F $_" } @GENERATED) -}
455 -del /Q /S /F *.d *.obj *.pdb *.ilk *.manifest
456 -del /Q /S /F engines\*.lib engines\*.exp
457 -del /Q /S /F apps\*.lib apps\*.rc apps\*.res apps\*.exp
458 -del /Q /S /F test\*.exp
459 -rmdir /Q /S test\test-runs
462 -del /Q /F configdata.pm
466 @ {- output_off() if $disabled{makedepend}; "" -}
467 @ "$(PERL)" "$(SRCDIR)\util\add-depends.pl" "{- $target{makedep_scheme} -}"
468 @ {- output_on() if $disabled{makedepend}; "" -}
470 # Install helper targets #############################################
472 install_sw: install_dev install_engines install_modules install_runtime
474 uninstall_sw: uninstall_runtime uninstall_modules uninstall_engines uninstall_dev
476 install_docs: install_html_docs
478 uninstall_docs: uninstall_html_docs
480 {- output_off() if $disabled{fips}; "" -}
481 install_fips: build_sw providers\fipsmodule.cnf
482 # @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
483 @$(PERL) $(SRCDIR)\util\mkdir-p.pl $(MODULESDIR)
484 @$(ECHO) "*** Installing FIPS module"
485 @$(ECHO) "install $(INSTALL_FIPS) -> $(MODULESDIR)\$(FIPSMODULENAME)"
486 @copy "$(INSTALL_FIPS)" $(MODULESDIR)\$(FIPSMODULENAME).new
487 @move /Y $(MODULESDIR)\$(FIPSMODULENAME).new \
488 $(MODULESDIR)\$(FIPSMODULENAME)
489 @$(ECHO) "*** Installing FIPS module configuration"
490 @$(ECHO) "install providers\fipsmodule.cnf -> $(OPENSSLDIR)\fipsmodule.cnf"
491 @copy providers\fipsmodule.cnf "$(OPENSSLDIR)\fipsmodule.cnf"
494 @$(ECHO) "*** Uninstalling FIPS module configuration"
495 $(RM) "$(OPENSSLDIR)\fipsmodule.cnf"
496 @$(ECHO) "*** Uninstalling FIPS module"
497 $(RM) "$(MODULESDIR)\$(FIPSMODULENAME)"
498 {- if ($disabled{fips}) { output_on(); } else { output_off(); } "" -}
500 @$(ECHO) "The 'install_fips' target requires the 'enable-fips' option"
503 @$(ECHO) "The 'uninstall_fips' target requires the 'enable-fips' option"
504 {- output_on() if !$disabled{fips}; "" -}
507 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\certs"
508 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\private"
509 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\misc"
510 @"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\openssl.cnf" \
511 "$(OPENSSLDIR)\openssl.cnf.dist"
512 @IF NOT EXIST "$(OPENSSLDIR)\openssl.cnf" \
513 "$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\openssl.cnf" \
514 "$(OPENSSLDIR)\openssl.cnf"
515 @if not "$(MISC_SCRIPTS)"=="" \
516 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(MISC_SCRIPTS) \
518 @"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\ct_log_list.cnf" \
519 "$(OPENSSLDIR)\ct_log_list.cnf.dist"
520 @IF NOT EXIST "$(OPENSSLDIR)\ct_log_list.cnf" \
521 "$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\ct_log_list.cnf" \
522 "$(OPENSSLDIR)\ct_log_list.cnf"
524 install_dev: install_runtime_libs
525 @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
526 @$(ECHO) "*** Installing development files"
527 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\include\openssl"
528 @{- output_off() unless grep { $_ eq "OPENSSL_USE_APPLINK" } (@{$target{defines}}, @{$config{defines}}); "" -}
529 @"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\ms\applink.c" \
530 "$(INSTALLTOP)\include\openssl"
531 @{- output_on() unless grep { $_ eq "OPENSSL_USE_APPLINK" } (@{$target{defines}}, @{$config{defines}}); "" -}
532 @"$(PERL)" "$(SRCDIR)\util\copy.pl" "-exclude_re=/__DECC_" \
533 "$(SRCDIR)\include\openssl\*.h" \
534 "$(INSTALLTOP)\include\openssl"
535 @"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(BLDDIR)\include\openssl\*.h" \
536 "$(INSTALLTOP)\include\openssl"
537 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(libdir)"
538 @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_LIBS) "$(libdir)"
539 @if "$(SHLIBS)"=="" \
540 "$(PERL)" "$(SRCDIR)\util\copy.pl" ossl_static.pdb "$(libdir)"
544 _install_modules_deps: install_runtime_libs build_modules
546 install_engines: _install_modules_deps
547 @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
548 @$(ECHO) "*** Installing engines"
549 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(ENGINESDIR)"
550 @if not "$(INSTALL_ENGINES)"=="" \
551 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINES) "$(ENGINESDIR)"
552 @if not "$(INSTALL_ENGINES)"=="" \
553 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINEPDBS) "$(ENGINESDIR)"
557 install_modules: _install_modules_deps
558 @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
559 @$(ECHO) "*** Installing modules"
560 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(MODULESDIR)"
561 @if not "$(INSTALL_MODULES)"=="" \
562 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_MODULES) "$(MODULESDIR)"
563 @if not "$(INSTALL_MODULES)"=="" \
564 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_MODULEPDBS) "$(MODULESDIR)"
568 install_runtime: install_programs
570 install_runtime_libs: build_libs
571 @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
572 @$(ECHO) "*** Installing runtime libraries"
573 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
574 @if not "$(SHLIBS)"=="" \
575 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBS) "$(INSTALLTOP)\bin"
576 @if not "$(SHLIBS)"=="" \
577 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBPDBS) \
580 install_programs: install_runtime_libs build_programs
581 @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
582 @$(ECHO) "*** Installing runtime programs"
583 @if not "$(INSTALL_PROGRAMS)"=="" \
584 "$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
585 @if not "$(INSTALL_PROGRAMS)"=="" \
586 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMS) \
588 @if not "$(INSTALL_PROGRAMS)"=="" \
589 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMPDBS) \
591 @if not "$(INSTALL_PROGRAMS)"=="" \
592 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(BIN_SCRIPTS) \
597 install_html_docs: build_html_docs
598 @if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
599 @echo *** Installing HTML docs
600 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man1"
601 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man3"
602 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man5"
603 @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man7"
604 @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\doc\html\man1\*.html \
605 "$(INSTALLTOP)\html\man1"
606 @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\doc\html\man3\*.html \
607 "$(INSTALLTOP)\html\man3"
608 @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\doc\html\man5\*.html \
609 "$(INSTALLTOP)\html\man5"
610 @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\doc\html\man7\*.html \
611 "$(INSTALLTOP)\html\man7"
615 # Helper targets #####################################################
617 copy-utils: $(BLDDIR)\util\wrap.pl $(BLDDIR)\apps\openssl.cnf
619 $(BLDDIR)\util\wrap.pl: configdata.pm
620 @if NOT EXIST "$(BLDDIR)\util" mkdir "$(BLDDIR)\util"
621 @if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\util\$(@F)" "$(BLDDIR)\util"
623 $(BLDDIR)\apps\openssl.cnf: configdata.pm
624 @if NOT EXIST "$(BLDDIR)\apps" mkdir "$(BLDDIR)\apps"
625 @if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\apps\$(@F)" "$(BLDDIR)\apps"
627 # Building targets ###################################################
629 configdata.pm: "$(SRCDIR)\Configure" {- join(" ", map { '"'.$_.'"' } @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -}
630 @$(ECHO) "Detected changed: $?"
631 "$(PERL)" configdata.pm -r
632 @$(ECHO) "**************************************************"
634 @$(ECHO) "*** Please run the same make command again ***"
636 @$(ECHO) "**************************************************"
640 "$(PERL)" configdata.pm -r
644 use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs file_name_is_absolute/;
646 # Helper function to figure out dependencies on libraries
647 # It takes a list of library names and outputs a list of dependencies
648 sub compute_lib_depends {
649 if ($disabled{shared}) {
650 return map { platform->staticlib($_) } @_;
652 return map { platform->sharedlib_import($_) // platform->staticlib($_) } @_;
657 my $deps = join(" ", @{$args{deps}});
663 # This function (and the next) avoids quoting paths of generated dependencies
664 # (in the build tree), but quotes paths of non-generated dependencies (in the
665 # source tree). This is a workaround for a limitation of C++Builder's make.exe
666 # in handling quoted paths: https://quality.embarcadero.com/browse/RSP-31756
669 my $gen0 = $args{generator}->[0];
670 my $gen_args = join('', map { " $_" }
671 @{$args{generator}}[1..$#{$args{generator}}]);
672 my $gen_incs = join("", map { " -I\"$_\"" } @{$args{generator_incs}});
673 my $incs = join("", map { " -I\"$_\"" } @{$args{incs}});
674 my $defs = join("", map { " -D".$_ } @{$args{defs}});
675 my $deps = @{$args{deps}} ?
677 map { file_name_is_absolute($_) || ($_ =~ m|^../|) ? "\"$_\"" : $_ }
678 (@{$args{generator_deps}}, @{$args{deps}}))
681 if ($args{src} =~ /\.html$/) {
685 my $title = basename($args{src}, ".html");
689 "\$(PERL)" "\$(SRCDIR)/util/mkpod2html.pl" -i "$pod" -o \$\@ -t "$title" -r "\$(SRCDIR)/doc"
691 } elsif (platform->isdef($args{src})) {
693 # Linker script-ish generator
695 my $target = platform->def($args{src});
696 my $mkdef = abs2rel(rel2abs(catfile($config{sourcedir},
697 "util", "mkdef.pl")),
698 rel2abs($config{builddir}));
699 my $ord_ver = $args{intent} eq 'lib' ? ' --version $(VERSION)' : '';
701 $args{generator}->[1] || platform->dsoname($args{product});
703 $target: $gen0 $deps $mkdef
704 "\$(PERL)" $mkdef$ord_ver --ordinals $gen0 --name $ord_name --OS windows > $target
706 } elsif (platform->isasm($args{src})) {
708 # Assembler generator
711 shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
712 lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
713 dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
714 bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
715 } -> {$args{intent}};
716 my $target = platform->asm($args{src});
719 if ($gen0 =~ /\.pl$/) {
720 $generator = '"$(PERL)"'.$gen_incs.' '.$gen0.$gen_args
721 .' "$(PERLASM_SCHEME)"'.$incs.' '.$cppflags.$defs.' $(PROCESSSOR)';
722 } elsif ($gen0 =~ /\.S$/) {
725 die "Generator type for $src unknown: $gen0\n";
728 if (defined($generator)) {
729 # If the target is named foo.S in build.info, we want to
730 # end up generating foo.s in two steps.
731 if ($args{src} =~ /\.S$/) {
733 $target: "$gen0" $deps
734 cmd /C "set "ASM=\$(AS)" & $generator \$@.S"
735 \$(CPP) $incs $cppflags $defs \$@.S > \$@.i
742 $target: "$gen0" $deps
743 cmd /C "set "ASM=\$(AS)" & $generator \$@"
747 $target: "$gen0" $deps
748 \$(CPP) $incs $cppflags $defs "$gen0" > \$@.i
751 } elsif ($gen0 =~ m|^.*\.in$|) {
753 # "dofile" generator (file.in -> file)
755 my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
756 "util", "dofile.pl")),
757 rel2abs($config{builddir}));
758 my @modules = ( 'configdata.pm',
759 grep { $_ =~ m|\.pm$| } @{$args{deps}} );
760 my %moduleincs = map { '"-I'.dirname($_).'"' => 1 } @modules;
761 $deps = join(' ', $deps, @modules);
762 @modules = map { "-M".basename($_, '.pm') } @modules;
763 my $modules = join(' ', '', sort keys %moduleincs, @modules);
765 $args{src}: "$gen0" $deps
766 "\$(PERL)"$modules "$dofile" "-o$target{build_file}" "$gen0"$gen_args > \$@
768 } elsif (grep { $_ eq $gen0 } @{$unified_info{programs}}) {
770 # Generic generator using OpenSSL programs
773 # Redo $deps, because programs aren't expected to have deps of their
774 # own. This is a little more tricky, though, because running programs
775 # may have dependencies on all sorts of files, so we search through
776 # our database of programs and modules to see if our dependencies
778 $deps = join(' ', map { my $x = $_;
779 if (grep { $x eq $_ }
780 @{$unified_info{programs}}) {
782 } elsif (grep { $x eq $_ }
783 @{$unified_info{modules}}) {
789 # Also redo $gen0, to ensure that we have the proper extension.
790 $gen0 = platform->bin($gen0);
792 $args{src}: $gen0 $deps "\$(BLDDIR)\\util\\wrap.pl"
793 "\$(PERL)" "\$(BLDDIR)\\util\\wrap.pl" $gen0$gen_args > \$@
797 # Generic generator using Perl
800 $args{src}: "$gen0" $deps
801 "\$(PERL)"$gen_incs $gen0$gen_args > \$@
807 my $asmext = platform->asmext();
811 (platform->isasm($x) && grep { $x eq $_ } @generated)
812 ? platform->asm($x) : $x }
814 my $srcs = '"'.join('" "', @srcs).'"';
816 map { file_name_is_absolute($_) || ($_ =~ m|^../|) ? "\"$_\"" : $_ }
817 (@srcs, @{$args{deps}}));
818 my $incs = join("", map { ' -I"'.$_.'"' } @{$args{incs}});
819 my $defs = join("", map { " -D".$_ } @{$args{defs}});
820 my $cflags = { shlib => ' $(LIB_CFLAGS)',
821 lib => ' $(LIB_CFLAGS)',
822 dso => ' $(DSO_CFLAGS)',
823 bin => ' $(BIN_CFLAGS)' } -> {$args{intent}};
825 $cflags .= { shlib => ' $(LIB_CPPFLAGS)',
826 lib => ' $(LIB_CPPFLAGS)',
827 dso => ' $(DSO_CPPFLAGS)',
828 bin => ' $(BIN_CPPFLAGS)' } -> {$args{intent}};
829 my $asflags = { shlib => ' $(LIB_ASFLAGS)',
830 lib => ' $(LIB_ASFLAGS)',
831 dso => ' $(DSO_ASFLAGS)',
832 bin => ' $(BIN_ASFLAGS)' } -> {$args{intent}};
833 my $makedepcmd = $config{makedepcmd} unless $disabled{makedepend};
834 if ($srcs[0] =~ /\.rc$/) {
835 my $res = platform->res($args{obj});
838 \$(RC) \$(RCFLAGS) \$(RCOUTFLAG)\$\@ $srcs
841 my $obj = platform->obj($args{obj});
842 my $dep = platform->dep($args{obj});
843 if ($srcs[0] =~ /\Q${asmext}\E$/) {
846 \$(AS) $asflags \$(ASOUTFLAG)\$\@ $srcs
848 } elsif ($srcs[0] =~ /.S$/) {
851 \$(CC) /EP -D__ASSEMBLER__ $cflags $defs $srcs > \$@.asm
852 \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm
855 my $recipe = <<"EOF";
857 \$(CC) $cflags $defs -c \$(COUTFLAG)\$\@ $srcs
859 $recipe .= <<"EOF" unless $disabled{makedepend};
860 cmd /C "$makedepcmd $cflags $defs $srcs > $dep 2>&1"
865 # We *know* this routine is only called when we've configure 'shared'.
866 # Also, note that even though the import library built here looks like
867 # a static library, it really isn't.
870 my $lib = $args{lib};
871 my @objs = map { platform->convertext($_) }
872 grep { platform->isobj($_) }
874 my @ress = map { platform->convertext($_) }
875 grep { platform->isres($_) }
877 my @defs = map { platform->def($_) }
878 grep { platform->isdef($_) }
880 my @deps = compute_lib_depends(@{$args{deps}});
881 die "More than one exported symbols list" if scalar @defs > 1;
882 my $linklibs = join("", map { "$_$target{ld_resp_delim}" } @deps);
883 my $objs = join($target{ld_resp_delim}, @objs);
884 my $ress = join($target{ld_resp_delim}, @ress);
885 my $deps = join(" ", @objs, @ress, @defs, @deps);
886 my $import = platform->sharedlib_import($lib);
887 my $dll = platform->sharedlib($lib);
888 my $shared_def = $target{lddefflag} . join("", @defs);
889 my $implib_rule = $target{ld_implib_rule} || "";
890 my $implib_flag = $target{ld_implib_flag}
891 ? "$target{ld_implib_flag}$import"
894 # The import library may look like a static library, but it is not.
895 # We MUST make the import library depend on the DLL, in case someone
896 # mistakenly removes the latter.
900 IF EXIST $full.manifest DEL /F /Q $full.manifest
901 IF EXIST \$@ DEL /F /Q \$@
902 cmd /C "\$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) @<< $implib_flag || (DEL /Q \$(\@B).* $import & EXIT 1)"
903 $objs$target{ld_resp_delim}\$(LDOUTFLAG)$dll$target{ldpostoutflag}$target{ld_resp_delim}$linklibs\$(LIB_EX_LIBS)$target{ld_resp_delim}$shared_def$target{ldresflag}$ress
905 IF EXIST $dll.manifest \\
906 \$(MT) \$(MTFLAGS) \$(MTINFLAG)$dll.manifest \$(MTOUTFLAG)$dll
907 IF EXIST apps\\$dll DEL /Q /F apps\\$dll
908 IF EXIST test\\$dll DEL /Q /F test\\$dll
909 IF EXIST fuzz\\$dll DEL /Q /F fuzz\\$dll
917 my $dso = platform->dso($args{module});
918 my $dso_n = platform->dsoname($args{module});
919 my @objs = map { platform->convertext($_) }
920 grep { platform->isobj($_) }
922 my @ress = map { platform->convertext($_) }
923 grep { platform->isres($_) }
925 my @defs = map { platform->def($_) }
926 grep { platform->isdef($_) }
928 my @deps = compute_lib_depends(@{$args{deps}});
929 die "More than one exported symbols list" if scalar @defs > 1;
930 my $objs = join($target{ld_resp_delim}, @objs);
931 my $ress = join($target{ld_resp_delim}, @ress);
932 my $linklibs = join("", map { "$_$target{ld_resp_delim}" } @deps);
933 my $deps = join(" ", @objs, @ress, @defs, @deps);
934 my $shared_def = $target{lddefflag} . join("", @defs);
937 IF EXIST $dso.manifest DEL /F /Q $dso.manifest
938 cmd /C "\$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) @<< || (DEL /Q \$(\@B).* $dso_n.* & EXIT 1)"
939 $objs$target{ld_resp_delim}\$(LDOUTFLAG)$dso$target{ldpostoutflag}$target{ld_resp_delim}$linklibs \$(DSO_EX_LIBS)$target{ld_resp_delim}$shared_def$target{ldresflag}$ress
941 IF EXIST $dso.manifest \\
942 \$(MT) \$(MTFLAGS) \$(MTINFLAG)$dso.manifest \$(MTOUTFLAG)$dso
947 my $lib = platform->staticlib($args{lib});
948 my @objs = map { platform->obj($_) } @{$args{objs}};
949 my $objs = join($target{ar_resp_delim}, @objs);
950 my $deps = join(" ", @objs);
953 \$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib @<<
960 my $bin = platform->bin($args{bin});
961 my @objs = map { platform->convertext($_) }
962 grep { platform->isobj($_) }
964 my @ress = map { platform->convertext($_) }
965 grep { platform->isres($_) }
967 my @deps = compute_lib_depends(@{$args{deps}});
968 my $objs = join($target{ld_resp_delim}, @objs);
969 my $linklibs = join("", map { "$_$target{ld_resp_delim}" } @deps);
970 my $deps = join(" ", @objs, @ress, @deps);
973 IF EXIST $bin.manifest DEL /F /Q $bin.manifest
974 \$(LD) \$(LDFLAGS) \$(BIN_LDFLAGS) @<<
975 $objs$target{ld_resp_delim}\$(LDOUTFLAG)$bin$target{ldpostoutflag}$target{ld_resp_delim}$linklibs\$(BIN_EX_LIBS)$target{ldresflag}$target{ldresflag}$ress
977 IF EXIST $bin.manifest \\
978 \$(MT) \$(MTFLAGS) \$(MTINFLAG)$bin.manifest \$(MTOUTFLAG)$bin
983 my $script = $args{script};
984 my $sources = '"'.join('" "', @{$args{sources}}).'"';
985 my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
986 "util", "dofile.pl")),
987 rel2abs($config{builddir}));
990 "\$(PERL)" "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
991 "-o$target{build_file}" $sources > \$@
996 my $dir = $args{dir};
997 my @deps = map { platform->convertext($_) } @{$args{deps}};
999 my %extinfo = ( dso => platform->dsoext(),
1000 lib => platform->libext(),
1001 bin => platform->binext() );
1003 # We already have a 'test' target, and the top directory is just plain
1005 return if $dir eq "test" || $dir eq ".";
1007 foreach my $type (("dso", "lib", "bin", "script")) {
1008 next unless defined($unified_info{dirinfo}->{$dir}->{products}->{$type});
1009 # For lib object files, we could update the library. However,
1010 # LIB on Windows doesn't work that way, so we won't create any
1011 # actions for it, and the dependencies are already taken care of.
1012 if ($type ne "lib") {
1013 foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
1014 if (dirname($prod) eq $dir) {
1015 push @deps, $prod.$extinfo{$type};
1021 my $deps = join(" ", @deps);
1022 my $actions = join("\n", "", @actions);
1024 $dir $dir\\ : $deps$actions
1027 "" # Important! This becomes part of the template result.