remove piraha cache files in make clean

Create issue
Issue #2045 closed
Roland Haas created an issue

Right now no clean target seems to remove them.

Keyword:

Comments (18)

  1. Roland Haas reporter
    • removed comment

    Any progress on this? I think this really should be in before the release since otherwise there is no way of getting rid of the cache files other than rm -rf configs/sim.

  2. Steven R. Brandt
    • removed comment

    Actually, I think this suffices:

    diff --git a/Makefile b/Makefile
    index b4ed2e9..31ac107 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -505,6 +505,7 @@ ifneq ($strip($(CONFIGURATIONS)),)
     $(addsuffix -clean,$(CONFIGURATIONS)):
            $(NOTIFY_DIVIDER)
            @echo Cleaning configuration $(@:%-clean=%)
    +       @rm -f $(CONFIGS_DIR)/$(@:%-clean=%)/piraha
            cd $(CONFIGS_DIR)/$(@:%-clean=%)
            $(MAKE) -f $(CCTK_HOME)/lib/make/make.configuration TOP=$(CONFIGS_DIR)/$(@:%-clean=%) CCTK_HOME=$(CCTK_HOME) clean
            $(NOTIFY_DIVIDER)
    
  3. Roland Haas reporter
    • removed comment

    Shouldn't it be part of -realclean as well? Possible also cleandeps and cleanobjs though those are less clear to me.

  4. Steven R. Brandt
    • removed comment

    OK, so updating...

    diff --git a/Makefile b/Makefile
    index b4ed2e9..d0e4539 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -505,6 +505,7 @@ ifneq ($strip($(CONFIGURATIONS)),)
     $(addsuffix -clean,$(CONFIGURATIONS)):
            $(NOTIFY_DIVIDER)
            @echo Cleaning configuration $(@:%-clean=%)
    +       @rm -fr $(CONFIGS_DIR)/$(@:%-clean=%)/piraha
            cd $(CONFIGS_DIR)/$(@:%-clean=%)
            $(MAKE) -f $(CCTK_HOME)/lib/make/make.configuration TOP=$(CONFIGS_DIR)/$(@:%-clean=%) CCTK_HOME=$(CCTK_HOME) clean
            $(NOTIFY_DIVIDER)
    @@ -591,6 +592,7 @@ ifneq ($strip($(CONFIGURATIONS)),)
     $(addsuffix -realclean,$(CONFIGURATIONS)):
            $(NOTIFY_DIVIDER)
            @echo Cleaning configuration $(@:%-realclean=%)
    +       @rm -fr $(CONFIGS_DIR)/$(@:%-clean=%)/piraha
            cd $(CONFIGS_DIR)/$(@:%-realclean=%)
            $(MAKE) -f $(CCTK_HOME)/lib/make/make.configuration TOP=$(CONFIGS_DIR)/$(@:%-realclean=%) CCTK_HOME=$(CCTK_HOME) realclean
            $(NOTIFY_DIVIDER)
    
  5. anonymous
    • removed comment

    The -realclean target should use @rm -fr $(CONFIGS_DIR)/$(@:%-realclean=%)/piraha I think.

  6. Roland Haas reporter
    • removed comment

    I would also suggest to add this to make.configuration whichsi where the actual work happens, not the wrapper Makefile in the Cactus root. Finally it may be better to make piraha a subdir of build (or scratch) which would automatically clean it in realclean (and clean).

  7. Roland Haas reporter
    • removed comment

    One more (slightly unexpected, but actually perfectly correct) observed behaviour: I also found that once I remove the piraha directory and call make sim again, it does not trigger CST ie the piraha cache is not re-generated which may be ok (since the C code generated from the ccl files did not change). I guess that one would need a rebuild to force CST to re-run (after all the piraha files are just caches so need only be re-genreated when the ccl files change).

  8. Roland Haas reporter
    • removed comment

    Just to be clear, since I am proposing the fix, Steve, would you mind to review them, please?

  9. Log in to comment