diff options
-rw-r--r-- | README | 11 | ||||
-rw-r--r-- | par/output_source.par | 1 | ||||
-rw-r--r-- | param.ccl | 5 | ||||
-rw-r--r-- | src/make.code.deps | 3 | ||||
-rw-r--r-- | src/make.configuration.deps | 16 |
5 files changed, 34 insertions, 2 deletions
@@ -17,3 +17,14 @@ number of iterations, an efficiency summary, etc. TODO: unique IDs for all output files +store ThornList and config-info as well + + + +BSD tar: nonrecursive: + read files from file: -I filename + +don't use -z; use tar and gzip + +find: don't emit directories +find: quote ! character diff --git a/par/output_source.par b/par/output_source.par index b0df357..83c4fd1 100644 --- a/par/output_source.par +++ b/par/output_source.par @@ -1,5 +1,6 @@ # $Header$ +Cactus::cctk_run_title = "Write out the stored source tree" Cactus::cctk_itlast = 0 ActiveThorns = "Formaline" @@ -3,6 +3,9 @@ +# Parameters for announcing to the portal +# (does not work yet properly) + BOOLEAN announce_to_portal "Announce to the portal" { } no @@ -24,6 +27,8 @@ STRING portal_username "User name on the portal" +# Parameters for storing the source tree in the executable + BOOLEAN output_source "Output a tarball with the cactus source tree" { } yes diff --git a/src/make.code.deps b/src/make.code.deps index 7eb6705..fc52179 100644 --- a/src/make.code.deps +++ b/src/make.code.deps @@ -1,6 +1,9 @@ # make.code.deps file for thorn Formaline -*-Makefile-*- # $Header$ +# Create the "makeblob" utility whenever this thorn is compiled +# Store it in the scratch directory of this configuration + $(CCTK_TARGET): $(SCRATCH_BUILD)/makeblob $(SCRATCH_BUILD)/makeblob: $(SCRATCH_BUILD)/makeblob.o diff --git a/src/make.configuration.deps b/src/make.configuration.deps index 997f9f5..fa7954b 100644 --- a/src/make.configuration.deps +++ b/src/make.configuration.deps @@ -5,12 +5,19 @@ # Create a tarball of the source code whenever this thorn is linked # into an executable + $(EXEDIR)$(DIRSEP)$(EXE): make-tarball CACTUSLIBLINKLINE += $(SCRATCH_BUILD)/cactus-source.a +# 1. Create a list of files that should be in the tarball +# 2. Create the tarball +# 3. Use the makeblob utility (from this thorn; see make.code.deps) +# to create C source code from the tarball +# 4. Compile C code and create an archive + .PHONY: make-tarball make-tarball: @echo "Creating source tarball..." && \ @@ -19,9 +26,14 @@ make-tarball: dirs="lib src" && \ thorns="$(THORNS:%=arrangements/%)" && \ filelist=$(SCRATCH_BUILD)/source-file-list && \ - find $$files $$dirs $$thorns -path 'arrangements/*/*/doc' -prune -o -path 'arrangements/*/*/test' -prune -o -print > $$filelist && \ + find $$files $$dirs $$thorns \ + -path 'arrangements/*/*/doc' -prune \ + -o -path 'arrangements/*/*/test' -prune \ + -o -path 'arrangements/*/*/par' -prune \ + -o -print > $$filelist && \ echo "Adding" `cat $$filelist | wc -l` "files..." && \ - tar czf "$(SCRATCH_BUILD)/cactus-source.tar.gz" --no-recursion -T $$filelist && \ + tar czf "$(SCRATCH_BUILD)/cactus-source.tar.gz" \ + --no-recursion -T $$filelist && \ echo "Created tarball with" `cat $(SCRATCH_BUILD)/cactus-source.tar.gz | wc -c` "bytes..." && \ cd $(SCRATCH_BUILD) && \ rm -rf cactus-source && \ |