X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configurations%2Fdescrip.mms.tmpl;h=cdfeb77ab2d0cde52e04c86b3ea9a1ecc80f2a3d;hp=ef745edc1ed7fd8d4cafec8433c0b6d1a170314a;hb=70ef905779dac29053256dd98c759f492073c39c;hpb=50e83cdde65dee08c5dc08391d6493452a8acc23 diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index ef745edc1e..cdfeb77ab2 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -105,6 +105,10 @@ ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{engines}}) -} PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } grep { !m|^\[\.test\]| } @{$unified_info{programs}}) -} TESTPROGS={- join(", ", map { "-\n\t".$_.".EXE" } grep { m|^\[\.test\]| } @{$unified_info{programs}}) -} SCRIPTS={- join(", ", map { "-\n\t".$_ } @{$unified_info{scripts}}) -} +DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; } + grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ } + keys %{$unified_info{sources}}; + join(", ", map { "-\n\t".$_ } @deps); -} # DESTDIR is for package builders so that they can configure for, say, # SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER]. @@ -152,7 +156,7 @@ ASFLAG={- $target{asflags} -} NODEBUG=@ .FIRST : $(NODEBUG) openssl_inc1 = F$PARSE("[.include.openssl]","A.;",,,"syntax_only") - "A.;" - $(NODEBUG) openssl_inc2 = F$PARSE("{- catdir($config{sourcedir},"[.include.openssl]") -}","a.;",,,"SYNTAX_ONLY") - "A.;" + $(NODEBUG) openssl_inc2 = F$PARSE("{- catdir($config{sourcedir},"[.include.openssl]") -}","A.;",,,"SYNTAX_ONLY") - "A.;" $(NODEBUG) internal_inc1 = F$PARSE("[.crypto.include.internal]","A.;",,,"SYNTAX_ONLY") - "A.;" $(NODEBUG) internal_inc2 = F$PARSE("{- catdir($config{sourcedir},"[.include.internal]") -}","A.;",,,"SYNTAX_ONLY") - "A.;" $(NODEBUG) internal_inc3 = F$PARSE("{- catdir($config{sourcedir},"[.crypto.include.internal]") -}","A.;",,,"SYNTAX_ONLY") - "A.;" @@ -200,9 +204,22 @@ NODEBUG=@ # The main targets ################################################### -all : descrip.mms, $(LIBS), $(ENGINES), $(PROGRAMS), $(SCRIPTS), $(TESTPROGS) - -test tests : $(TESTPROGS), rehash +all : configdata.pm, - + build_libs_nodep, build_engines_nodep, build_apps_nodep, - + depend + +build_libs : configdata.pm, build_libs_nodep, depend +build_libs_nodep : $(LIBS) +build_engines : configdata.pm, build_engines_nodep, depend +build_engines_nodep : $(ENGINES) +build_apps : configdata.pm, build_apps_nodep, depend +build_apps_nodep : $(PROGRAMS), $(SCRIPTS) +build_tests : configdata.pm, build_tests_nodep, depend +build_tests_nodep : $(TESTPROGS) + +test tests : configdata.pm, - + build_apps_nodep, build_engines_nodep, build_tests_nodep, - + depend, rehash SET DEFAULT [.test]{- move("test") -} DEFINE SRCTOP {- sourcedir() -} DEFINE BLDTOP {- builddir() -} @@ -237,24 +254,18 @@ clean : libclean - DELETE [.test]*.LOG;* - DELETE []*.MAP;* -DCLEAN_CMD=$(PERL) -pe "if (/^# DO NOT DELETE.*/) { exit(0); }" -dclean : - $(DCLEAN_CMD) < descrip.mms > descrip.mms.new - RENAME descrip.mms.new descrip.mms - PURGE descrip.mms - -{- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; } - grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ } - keys %{$unified_info{sources}}; - ""; -} -depend : {- join(",-\n\t", @deps); -} - $(DCLEAN_CMD) < descrip.mms > descrip.mms.new - OPEN/APPEND DESCRIP descrip.mms.new - WRITE DESCRIP "# DO NOT DELETE THIS LINE -- make depend depends on it." - {- join("\n\t", map { "TYPE $_ /OUTPUT=DESCRIP:" } @deps); -} - CLOSE DESCRIP - RENAME descrip.mms.new descrip.mms - PURGE descrip.mms +depend : descrip.mms +descrip.mms : FORCE + @ $(PERL) -pe "if (/^# DO NOT DELETE.*/) { exit(0); }" - + < descrip.mms > descrip.mms-new + @ OPEN/APPEND DESCRIP descrip.mms-new + @ WRITE DESCRIP "# DO NOT DELETE THIS LINE -- make depend depends on it." + @ {- join("\n\t", map { "IF F\$SEARCH(\"$_\") .NES. \"\" THEN TYPE $_ /OUTPUT=DESCRIP:" } @deps); -} + @ CLOSE DESCRIP + @ DIFF/OUTPUT=NLA0: descrip.mms,descrip.mms-new + @ IF $SEVERITY .EQ. 3 THEN RENAME descrip.mms-new descrip.mms + @ IF F$SEARCH("descrip.mms-new") .NES. "" THEN DELETE descrip.mms-new;* + -@ SPAWN/OUTPUT=NLA0: PURGE/NOLOG descrip.mms # Install helper targets ############################################# @@ -288,9 +299,9 @@ install_dev : check_INSTALLTOP @ {- output_off() if $config{no_shared}; "" -} ! {- join("\n ", map { "COPY/PROT=W:RE $_.EXE ossl_installroot:['arch'.LIB]" } - map { $unified_info{sharednames}->{$_} || () } + map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -} - @ {- output_on() -} ! + @ {- output_on() if $config{no_shared}; "" -} ! install_runtime : check_INSTALLTOP @ WRITE SYS$OUTPUT "*** Installing runtime files" @@ -310,7 +321,7 @@ install_engines : check_INSTALLTOP @ WRITE SYS$OUTPUT "*** Installing engines" CREATE/DIR ossl_installroot:['arch'.ENGINES] COPY/PROT=W:RE [.ENGINES]*.EXE ossl_installroot:['arch'.ENGINES] - @ {- output_on() -} ! + @ {- output_on() if $config{no_shared}; "" -} ! install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com - check_INSTALLTOP @@ -340,7 +351,7 @@ install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com - {- sourcefile("VMS", "openssl_shutdown.com.in") -} - > [.VMS]openssl_shutdown.com -vmsconfig.pm : descrip.mms +vmsconfig.pm : configdata.pm OPEN/WRITE/SHARE=READ CONFIG []vmsconfig.pm WRITE CONFIG "package vmsconfig;" WRITE CONFIG "use strict; use warnings;" @@ -372,7 +383,7 @@ check_INSTALLTOP : # Helper targets ##################################################### -rehash : [.apps]openssl.exe, copy-certs +rehash : copy-certs, build_apps_nodep !MCR [.apps]openssl.exe rehash {- builddir("certs", "demo") -} $(PERL) [.tools]c_rehash. [.certs.demo] @@ -391,8 +402,8 @@ debug_logicals : # Building targets ################################################### -descrip.mms : {- sourcefile("Configurations", "descrip.mms.tmpl") -} $(SRCDIR)Configure ! $(SRCDIR)config.com - @ WRITE SYS$OUTPUT "descrip.mms is older than $?." +configdata.pm : {- sourcefile("Configurations", "descrip.mms.tmpl") -} $(SRCDIR)Configure ! $(SRCDIR)config.com + @ WRITE SYS$OUTPUT "Detected changed: $?" @ WRITE SYS$OUTPUT "Reconfiguring..." perl $(SRCDIR)Configure reconf @ WRITE SYS$OUTPUT "*************************************************" @@ -400,48 +411,11 @@ descrip.mms : {- sourcefile("Configurations", "descrip.mms.tmpl") -} $(SRCDIR)Co @ WRITE SYS$OUTPUT "*** Please run the same mms command again ***" @ WRITE SYS$OUTPUT "*** ***" @ WRITE SYS$OUTPUT "*************************************************" - @ exit %10000000 + @ PIPE ( EXIT %X10000000 ) {- use File::Basename; use File::Spec::Functions qw/abs2rel rel2abs catfile catdir/; - sub src2dep { - my %args = @_; - my $dep = $args{obj}; - my $deps = join(", -\n\t\t", @{$args{srcs}}, @{$args{deps}}); - - # Because VMS C isn't very good at combining a /INCLUDE path with - # #includes having a relative directory (like '#include "../foo.h"), - # the best choice is to move to the first source file's intended - # directory before compiling, and make sure to write the object file - # in the correct position (important when the object tree is other - # than the source tree). - my $forward = dirname($args{srcs}->[0]); - my $backward = abs2rel(rel2abs("."), rel2abs($forward)); - my $depd = abs2rel(rel2abs(dirname($dep)), rel2abs($forward)); - my $depn = basename($dep); - my $srcs = - join(", ", - map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}}); - my $incs = - "/INCLUDE=(".join(",", - map { - file_name_is_absolute($_) - ? $_ : catdir($backward,$_) - } @{$args{incs}}).")"; - my $before = $unified_info{before}->{$dep.".OBJ"} || "\@ !"; - my $after = $unified_info{after}->{$dep.".OBJ"} || "\@ !"; - - return <<"EOF"; -$dep.MMS : $deps - ${before} - SET DEFAULT $forward - \$(CC) \$(CFLAGS)${incs} /MMS=(TARGET=.OBJ)/OBJECT=${depd}${depn}.MMS $srcs - SET DEFAULT $backward - ${after} - - PURGE $dep.MMS -EOF - } sub src2obj { my %args = @_; my $obj = $args{obj}; @@ -470,7 +444,14 @@ EOF my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !"; return <<"EOF"; -$obj.OBJ : $deps +$obj.MMS : $deps + ${before} + SET DEFAULT $forward + \$(CC) \$(CFLAGS)${incs} /MMS=(FILE=${objd}${objn}.MMS,TARGET=$obj.OBJ) /NOOBJECT $srcs + SET DEFAULT $backward + ${after} + - PURGE $obj.MMS +$obj.OBJ : $obj.MMS ${before} SET DEFAULT $forward \$(CC) \$(CFLAGS)${incs} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs @@ -624,7 +605,8 @@ EOF rel2abs($config{builddir})); return <<"EOF"; $script : $sources - \$(PERL) "-I\$(BUILDDIR)" "-Mconfigdata" $dofile $sources > $script + \$(PERL) "-I\$(BUILDDIR)" "-Mconfigdata" $dofile - + "-o$target{build_file}" $sources > $script SET FILE/PROT=(S:RWED,O:RWED,G:RE,W:RE) $script PURGE $script EOF