[cig-commits] [commit] master: Add placeholder directories. (1a7919d)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jan 5 23:01:42 PST 2015


Repository : https://github.com/geodynamics/specfem1d

On branch  : master
Link       : https://github.com/geodynamics/specfem1d/compare/0474318db2f3c07f3ea053913eed9404264a153e...35bd59c099344f3bf7aa0e5570daa5ec1eca3c07

>---------------------------------------------------------------

commit 1a7919d8f5b76e532888c6487eb2640c62758ffb
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Tue Jan 6 01:05:04 2015 -0500

    Add placeholder directories.
    
    Also, stop messing with directories in the Makefiles.


>---------------------------------------------------------------

1a7919d8f5b76e532888c6487eb2640c62758ffb
 Fortran_version/Makefile                           | 27 +++-------------------
 Fortran_version/{OUTPUT_FILES => obj}/.gitignore   |  0
 obj/.keep                                          |  0
 .../obj}/.gitignore                                |  0
 4 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/Fortran_version/Makefile b/Fortran_version/Makefile
index bfd7590..1706c6c 100644
--- a/Fortran_version/Makefile
+++ b/Fortran_version/Makefile
@@ -50,12 +50,9 @@ NAME := $(basename $(notdir $(SRC)))
 OBJ := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(NAME)))
 
 # To make the executable
-all: make_directory $(OBJ)
+all: $(OBJ)
 	$(F90) -o $(BIN_DIR)/$(EXEC) $(OBJ) $(LDFLAGS)
 
-# Rule to make directory
-make_directory: dirobj bin
-
 $(OBJ_DIR)/gaussm3.o: $(SRC_DIR)/gaussm3.f90
 	$(F90) $(MOD_OPTION)$(OBJ_DIR) -I$(OBJ_DIR) -c $(SRC_DIR)/gaussm3.f90 -o $(OBJ_DIR)/gaussm3.o $(FLAGS)
 
@@ -78,31 +75,13 @@ $(OBJ_DIR)/specfem1d.o: $(OBJ_DIR)/modules.o $(SRC_DIR)/specfem1d.f90
 	$(F90) $(MOD_OPTION)$(OBJ_DIR) -I$(OBJ_DIR) -c $(SRC_DIR)/specfem1d.f90 -o $(OBJ_DIR)/specfem1d.o $(FLAGS)		
 
 # .PHONY is useful for example if a file called "clean" exists in the current directory -> "make clean" would not work
-.PHONY: dirobj bin
-
-# Create the directory $(OBJ_DIR) if needed :
-ifeq ($(strip $( $(wildcard $(OBJ_DIR)) ) ), )
-dirobj: 
-	@mkdir -p $(OBJ_DIR)
-else
-dirobj: 
-endif
-
-# Create the directory $(BIN_DIR) if needed :
-ifeq ($(strip $( $(wildcard $(BIN_DIR)) ) ), )
-bin: 
-	@mkdir -p $(BIN_DIR)
-else
-bin: 
-endif 
-
 .PHONY: clean purge 
 
 # Clean remove all .o (if you don't want to see the messages use : @rm -rf *.o -> only the error messages will appear)
 clean:
-	rm -rf $(OBJ_DIR) $(SRC_DIR)/*~ *~ .plot_all_snapshots.gnu utils/*~ $(BIN_DIR)/*
+	rm -rf $(OBJ) $(SRC_DIR)/*~ *~ .plot_all_snapshots.gnu utils/*~ $(BIN_DIR)/$(EXEC)
 
 # Clean and remove executable
 purge: clean
-	rm -rf $(BIN_DIR) OUTPUT_FILES
+	rm -rf OUTPUT_FILES
 
diff --git a/Fortran_version/OUTPUT_FILES/.gitignore b/Fortran_version/obj/.gitignore
similarity index 100%
copy from Fortran_version/OUTPUT_FILES/.gitignore
copy to Fortran_version/obj/.gitignore
diff --git a/obj/.keep b/obj/.keep
deleted file mode 100644
index e69de29..0000000
diff --git a/Fortran_version/OUTPUT_FILES/.gitignore b/older_Fortran_version_from_Jeroen_and_Dimitri_also_with_diffusion_equation/obj/.gitignore
similarity index 100%
copy from Fortran_version/OUTPUT_FILES/.gitignore
copy to older_Fortran_version_from_Jeroen_and_Dimitri_also_with_diffusion_equation/obj/.gitignore



More information about the CIG-COMMITS mailing list