diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-05-19 09:53:23 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-05-19 09:53:23 +0000 |
commit | 88bd58c546d70805d02a43d51a1640fb398aa5be (patch) | |
tree | 66b93f4b66f8e14189aeb6af6cd89841a27510c9 | |
parent | 0ead39f665ce2925e8818b5c1be319453abdb01e (diff) |
Changed to using the cygwin version of Perl under cygwin. This has
the translation of CCTK_HOME to a windows format from the master Makefile,
and forced the addition of a new Make macro
TRANSLATE_DIRS
which is used in various places in Make to translate things like
/cygwin/f/...
into
f:\...
This is a 'call'able macro in Make, and defaults to $(1).
There is a new subroutine in RunTestUtils which serves the same purpose.
This change should not affect anyone not using Cactus on Windows. If you
are using Windows you will need to reconfigure, making sure that the Perl
you use is the cygwin one and not the ActiveState one.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3742 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | doc/README.NT | 5 | ||||
-rwxr-xr-x | lib/make/configure | 54 | ||||
-rw-r--r-- | lib/make/configure.in | 5 | ||||
-rw-r--r-- | lib/make/known-architectures/cygwin | 6 | ||||
-rw-r--r-- | lib/make/make.config.defn.in | 5 | ||||
-rw-r--r-- | lib/make/make.config.rules.in | 29 | ||||
-rw-r--r-- | lib/make/make.configuration | 16 | ||||
-rw-r--r-- | lib/sbin/RunTestUtils.pl | 17 |
9 files changed, 88 insertions, 53 deletions
@@ -16,7 +16,7 @@ # # # @enddesc -# @version $Id: Makefile,v 1.153 2004-05-13 21:11:47 goodale Exp $ +# @version $Id: Makefile,v 1.154 2004-05-19 09:53:23 goodale Exp $ # @@*/ ################################################################################## @@ -187,7 +187,7 @@ DIVEL = __________________ DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL) # Work out where we are -export CCTK_HOME := $(shell pwd | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed 's,^//\(.\)/,\1:/,' ) +export CCTK_HOME := $(shell pwd) # Work out where the configuration directory is diff --git a/doc/README.NT b/doc/README.NT index 1e4d6f25..74ed13f2 100644 --- a/doc/README.NT +++ b/doc/README.NT @@ -40,11 +40,6 @@ Cygwin 1.0 (but with an updated make, see below) Cygwin 1.1.6 Cygwin 1.3.10 -Perl: ----- -perl 5.003_7 (Perl for Win32 build 312) -ActivePerl-5.6.0.620 - C/C++: ----- Microsoft Visual C 6.0 diff --git a/lib/make/configure b/lib/make/configure index 253fcd81..b4c0e664 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -1670,12 +1670,12 @@ else #line 1671 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long long)); - exit(0); + return(0); } EOF if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1714,12 +1714,12 @@ else #line 1715 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long int)); - exit(0); + return(0); } EOF if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1758,12 +1758,12 @@ else #line 1759 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1802,12 +1802,12 @@ else #line 1803 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short int)); - exit(0); + return(0); } EOF if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1848,12 +1848,12 @@ else #line 1849 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long double)); - exit(0); + return(0); } EOF if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1892,12 +1892,12 @@ else #line 1893 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(double)); - exit(0); + return(0); } EOF if { (eval echo configure:1904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1937,12 +1937,12 @@ else #line 1938 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(float)); - exit(0); + return(0); } EOF if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -1983,12 +1983,12 @@ else #line 1984 "configure" #include "confdefs.h" #include <stdio.h> -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(char *)); - exit(0); + return(0); } EOF if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -5021,6 +5021,11 @@ fi : ${GET_WD="pwd"} +# Way for Make to transofrm things like include directories +# into a form suitable for the compiler. + +: ${TRANSFORM_DIRS='$(1)'} + # Any additional system include directories. : ${SYS_INC_DIRS=" "} @@ -5318,6 +5323,7 @@ s%@F90_POSTPROCESSING@%$F90_POSTPROCESSING%g s%@CXX_WORKING_NAME@%$CXX_WORKING_NAME%g s%@F90_SUFFIX@%$F90_SUFFIX%g s%@GET_WD@%$GET_WD%g +s%@TRANSFORM_DIRS@%$TRANSFORM_DIRS%g s%@SYS_INC_DIRS@%$SYS_INC_DIRS%g s%@GENERAL_LIBRARIES@%$GENERAL_LIBRARIES%g s%@PERL_BACKUP_NECESSARY@%$PERL_BACKUP_NECESSARY%g diff --git a/lib/make/configure.in b/lib/make/configure.in index abac7c8f..76d76995 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -1063,6 +1063,11 @@ AC_SUBST(F90_SUFFIX) AC_SUBST(GET_WD) : ${GET_WD="pwd"} +# Way for Make to transofrm things like include directories +# into a form suitable for the compiler. +AC_SUBST(TRANSFORM_DIRS) +: ${TRANSFORM_DIRS='$(1)'} + # Any additional system include directories. AC_SUBST(SYS_INC_DIRS) : ${SYS_INC_DIRS=" "} diff --git a/lib/make/known-architectures/cygwin b/lib/make/known-architectures/cygwin index 43d2393d..3e44ffd4 100644 --- a/lib/make/known-architectures/cygwin +++ b/lib/make/known-architectures/cygwin @@ -132,6 +132,8 @@ else GET_WD="pwd | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed 's,^//\(.\)/,\1:/,' " fi + TRANSFORM_DIRS='$(shell cygpath -wa $(1))' + # The -nostdinc stops it picking stdio.h, etc, from the GNU headers. C_DEPEND='$(CPP) -E -MM -nostdinc -D_WIN32 $(CPPFLAGS) ' CXX_DEPEND='$(CPP) -E -MM -nostdinc -D_WIN32 $(CPPFLAGS) ' @@ -149,12 +151,12 @@ else LIBNAME_PREFIX="" LIBNAME_SUFFIX=".lib" if test "$CC" = "cl"; then - CACTUSLIBLINKLINE='/link /libpath:$(subst /,$(DIRSEP),$(CCTK_LIBDIR)) $(foreach lib,$(ALLCACTUSLIBS), $(LIBNAME_PREFIX)$(lib)$(LIBNAME_SUFFIX))' + CACTUSLIBLINKLINE='/link /libpath:"$(call TRANSFORM_DIRS,$(CCTK_LIBDIR))" $(foreach lib,$(ALLCACTUSLIBS), $(LIBNAME_PREFIX)$(lib)$(LIBNAME_SUFFIX))' fi # Don't need the /link here since it's already in CACTUSLIBLINKLINE if test "$CC" = "cl"; then - GENERAL_LIBRARIES='$(LIBDIRS:%=/libpath:$(subst /,$(DIRSEP),%)) $(LIBS:%=%.lib) /NODEFAULTLIB:libcd /NODEFAULTLIB:libcmt' + GENERAL_LIBRARIES='$(LIBDIRS:%=/libpath:"$(call TRANSFORM_DIRS,%)") $(LIBS:%=%.lib) /NODEFAULTLIB:libcd /NODEFAULTLIB:libcmt' else GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)' fi diff --git a/lib/make/make.config.defn.in b/lib/make/make.config.defn.in index 93b21b97..d10400d3 100644 --- a/lib/make/make.config.defn.in +++ b/lib/make/make.config.defn.in @@ -120,6 +120,11 @@ DEP_EXCLUDE_FILES = cctk_Functions\.h|CParameterStructNames\.h|cctk_Arguments\.h # Command used to get the working directory GET_WD = @GET_WD@ +# Way for Make to transofrm things like include directories +# into a form suitable for the compiler. + +TRANSFORM_DIRS = @TRANSFORM_DIRS@ + # Library info LIBS += @LIBS@ LIBDIRS += @LIBDIRS@ diff --git a/lib/make/make.config.rules.in b/lib/make/make.config.rules.in index b9348754..b602905f 100644 --- a/lib/make/make.config.rules.in +++ b/lib/make/make.config.rules.in @@ -22,6 +22,11 @@ DIVEL = __________________ DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL) ##################################################################### +# Shortcuts. + +INCLUDE_LINE = $(patsubst %,-I"%",$(call TRANSFORM_DIRS,$(INC_DIRS))) + +##################################################################### # Define how to do dependencies ifeq ($(strip $(PERL_BACKUP_NECESSARY)),) @@ -37,30 +42,30 @@ endef endif define C_DEPENDENCIES - $(C_DEPEND) $< $(INC_DIRS:%=-I%) $(SYS_INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE $(C_DEPEND_OUT) + $(C_DEPEND) $< $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DCCODE $(C_DEPEND_OUT) $(DEPENDENCY_FIXER) endef define CXX_DEPENDENCIES - $(CXX_DEPEND) $< $(INC_DIRS:%=-I%) $(SYS_INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE $(CXX_DEPEND_OUT) + $(CXX_DEPEND) $< $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DCCODE $(CXX_DEPEND_OUT) $(DEPENDENCY_FIXER) endef define F77_DEPENDENCIES - $(F77_DEPEND) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE $< $(F77_DEPEND_OUT) + $(F77_DEPEND) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE $< $(F77_DEPEND_OUT) $(DEPENDENCY_FIXER) endef define F_DEPENDENCIES - $(F_DEPEND) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE $< $(F_DEPEND_OUT) + $(F_DEPEND) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE $< $(F_DEPEND_OUT) $(DEPENDENCY_FIXER) - current_wd=`$(GET_WD)` ; { if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) $(F_DEPEND_MODULES) $< $(basename $(notdir $<)).F.o $(SRCDIR) $(USESTHORNS:%=$$current_wd/../%) $(F_DEPEND_MODULES_OUT) || { rm $@; exit 1; } + current_wd=`$(GET_WD)` ; { if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) $(F_DEPEND_MODULES) $< $(basename $(notdir $<)).F.o $(SRCDIR) $(USESTHORNS:%=$$current_wd/../%) $(F_DEPEND_MODULES_OUT) || { rm $@; exit 1; } endef define F90_DEPENDENCIES - $(F_DEPEND) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE $< $(F_DEPEND_OUT) + $(F_DEPEND) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE $< $(F_DEPEND_OUT) $(DEPENDENCY_FIXER) - current_wd=`$(GET_WD)` ; { if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) $(F_DEPEND_MODULES) $< $(basename $(notdir $<)).F90.o $(SRCDIR) $(USESTHORNS:%=$$current_wd/../%) $(F_DEPEND_MODULES_OUT) || { rm $@; exit 1; } + current_wd=`$(GET_WD)` ; { if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) $(F_DEPEND_MODULES) $< $(basename $(notdir $<)).F90.o $(SRCDIR) $(USESTHORNS:%=$$current_wd/../%) $(F_DEPEND_MODULES_OUT) || { rm $@; exit 1; } endef # No preprocessing, just create empty dependency file @@ -86,7 +91,7 @@ define PREPROCESS_C endef define COMPILE_C -current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CC) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(notdir $<) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE +current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CC) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(notdir $<) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DCCODE endef define POSTPROCESS_C @@ -99,7 +104,7 @@ define PREPROCESS_CXX endef define COMPILE_CXX -current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CXX) $(CXXFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(CXX_WORKING_NAME) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE +current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CXX) $(CXXFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(CXX_WORKING_NAME) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DCCODE endef define POSTPROCESS_CXX @@ -108,7 +113,7 @@ endef # Define how to do a F77 compilation define PREPROCESS_F77 -{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F77\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).f +{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F77\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).f endef define COMPILE_F77 @@ -121,7 +126,7 @@ endef # Define how to do a fixed-format F90 compilation define PREPROCESS_F -{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).f +{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).f endef define COMPILE_F @@ -134,7 +139,7 @@ endef # Define how to do a free-format F90 compilation define PREPROCESS_F90 -{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F90\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -free_format -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).$(F90_SUFFIX) +{ if test $(F_LINE_DIRECTIVES) = 'yes'; then echo '#line 1 "'$<'"'; fi; cat $<; } | $(PERL) -p -e 's.//.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.g' | $(FPP) $(FPPFLAGS) $(INCLUDE_LINE) $(EXTRA_DEFINES:%=-D%) -DFCODE -DF90CODE | $(PERL) -p -e 's.CCTK_AUTOMATICALLY_GENERATED_CONCATENATION_PROTECTION.//.g' | $(PERL) -p -e 's/__FORTRANFILE__/\"$(basename $(notdir $<)).F90\"/g' | $(PERL) -s $(F_FILE_PROCESSOR) -free_format -line_directives=$(F_LINE_DIRECTIVES) -source_file_name=$< > $(basename $(notdir $<)).$(F90_SUFFIX) endef define COMPILE_F90 diff --git a/lib/make/make.configuration b/lib/make/make.configuration index 365b1ed6..b426c143 100644 --- a/lib/make/make.configuration +++ b/lib/make/make.configuration @@ -38,9 +38,6 @@ ifneq ($(strip $(OPTIMIZE)), ) $(warning "You specified 'OPTIMIZE=$(OPTIMIZE)'. This option is evaluated only at configuration time and will be ignored at compile time.") endif - -DATESTAMP = $(CCTK_HOME)/src/datestamp.c - export MAKE_DIR = $(CCTK_HOME)/lib/make FLESHLIB = Cactus @@ -55,6 +52,15 @@ DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL) # Include the definitions for this configuration include $(CONFIG)/make.config.defn +# Remove this line in 4.0 beta 16, by which all configs should have this defined +ifndef TRANSFORM_DIRS +TRANSFORM_DIRS = $(1) +endif + +# Define the name of the source file which is the one object on the linkline + +DATESTAMP = $(CCTK_HOME)/src/datestamp.c + export PERLINTERP = $(shell echo $(PERL) | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed 's,^//\(.\)/,\1:/,' ) # Use a phony main target to make sure we print a nice ending message 8-) @@ -129,9 +135,9 @@ ALLCACTUSLIBS = $(notdir $(CACTUSLIBS) $(THORN_LINKLIST) $(CACTUSLIBS)) # Build the executable $(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %,$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)%$(LIBNAME_SUFFIX),$(notdir $(THORNS) $(CACTUSLIBS))) @echo Creating $(EXE) in $(EXEDIR) from $(THORNS) - $(CC) $(OPTIMISE_C) $(DEBUG_C) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$(TOP)$(DIRSEP)datestamp.o -I$(subst /,$(DIRSEP),$(CCTK_HOME)/src/include) -I$(CONFIG) $(subst /,$(DIRSEP),$(DATESTAMP)) + $(CC) $(OPTIMISE_C) $(DEBUG_C) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" -I"$(call TRANSFORM_DIRS,$(CCTK_HOME)/src/include)" -I"$(call TRANSFORM_DIRS,$(CONFIG))" "$(call TRANSFORM_DIRS,$(DATESTAMP))" if [ ! -d $(EXEDIR) ]; then $(MKDIR) $(MKDIRFLAGS) $(EXEDIR) ; fi - $(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES) + $(LD) $(CREATEEXE)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$@)" $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) "$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES) @echo $(DIVIDER) # Version file diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl index 9ab11ff6..af51f9bb 100644 --- a/lib/sbin/RunTestUtils.pl +++ b/lib/sbin/RunTestUtils.pl @@ -843,7 +843,7 @@ sub RunTest my ($test_dir,$config); my ($retcode); - $arrangement = $testdata->{"$thorn ARRANGEMENT"}; + my $arrangement = $testdata->{"$thorn ARRANGEMENT"}; $testdata->{"$thorn $test TESTRUNDIR"} = $config_data->{"TESTS_DIR"}.$sep.$config_data->{"CONFIG"}.$sep.$thorn; @@ -852,7 +852,7 @@ sub RunTest # Make any necessary directories &MakeTestRunDir($testdata->{"$thorn $test TESTRUNDIR"}); - $parfile = $test.".par"; + my $parfile = TransformDirs($testdata->{"$thorn TESTSDIR"}. "/" . $test . ".par"); # Clean the output directory for this test &CleanDir($testdata->{"$thorn $test TESTOUTPUTDIR"}); @@ -860,7 +860,8 @@ sub RunTest # Run the test from the test thorn directory chdir ($testdata->{"$thorn $test TESTRUNDIR"}) ; - $cmd = "$config_data->{\"COMMAND\"} $config_data->{\"EXE\"} $testdata->{\"$thorn TESTSDIR\"}${sep}$parfile"; + + $cmd = "$config_data->{\"COMMAND\"} $config_data->{\"EXE\"} $parfile"; $retcode = &RunCactus($output,$test,$cmd); chdir $config_data->{"CCTK_DIR"}; @@ -1461,4 +1462,14 @@ sub ViewResults } +sub TransformDirs +{ + my ($in) = @_; + + $in =~ s,^/cygdrive/(.)/,\1:/,; + $in =~ s,^//(.)/,\1:/,; + + return $in; +} + 1; |