Skip to content

Commit

Permalink
maint: finalized command overridings
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Sep 10, 2019
1 parent 30c58ce commit 3172fa4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ include $(TOP_DIR)/test/Makefile.inc
.PHONY: copy
ifeq ($(TOP_DIR),.)
copy:
@echo ""
@echo "make copy does not work when executed from the top fdict directory"
@echo "Please create an object directory with an appropriate Makefile"
@echo ""
@$(ECHO) ""
@$(ECHO) "make copy does not work when executed from the top fdict directory"
@$(ECHO) "Please create an object directory with an appropriate Makefile"
@$(ECHO) ""
else
copy:
cp $(SOURCES_DIR)/src/*.f90 $(SOURCES_DIR)/src/*.inc .
$(CP) $(SOURCES_DIR)/src/*.f90 $(SOURCES_DIR)/src/*.inc .
endif

# Create source target for creating _only_ the sources.
Expand All @@ -74,9 +74,9 @@ dist-fdict:
# Force the creation of the 3 pre-defined source directories
$(MAKE) source
# Clean up
-rm -f *.inc
-$(RM) $(RM_FLAG_FORCE) *.inc
tar --transform 's,^,fdict-$(PROJECT_VERSION)/,' -rf fdict-$(PROJECT_VERSION).tar sources*
-@rm -f fdict-$(PROJECT_VERSION).tar.gz
-@$(RM) $(RM_FLAG_FORCE) fdict-$(PROJECT_VERSION).tar.gz
gzip fdict-$(PROJECT_VERSION).tar

dist: dist-fdict
Expand Down
28 changes: 14 additions & 14 deletions src/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ dictionary.f90: dictionary_pp.F90 dictionary.sh settings.inc dictionary_funcs_in
$(FPP) $(FPPFLAGS) $(INCLUDES) -I$(src_DIR) -I. $< | sed -f $(src_DIR)/filter.sed > $@

fdict.inc:
@echo "#ifndef _FDICT_INCLUDE_DEFINED" > $@
@echo "#define _FDICT_INCLUDE_DEFINED" >> $@
@echo "#define _FDICT_MAJOR_ $(PROJECT_MAJOR)" >> $@
@echo "#define _FDICT_MINOR_ $(PROJECT_MINOR)" >> $@
@echo "#define _FDICT_MICRO_ $(PROJECT_MICRO)" >> $@
@echo "#define _FDICT_VERSION_ $(PROJECT_VERSION)" >> $@
@echo "#endif" >> $@
@$(ECHO) "#ifndef _FDICT_INCLUDE_DEFINED" > $@
@$(ECHO) "#define _FDICT_INCLUDE_DEFINED" >> $@
@$(ECHO) "#define _FDICT_MAJOR_ $(PROJECT_MAJOR)" >> $@
@$(ECHO) "#define _FDICT_MINOR_ $(PROJECT_MINOR)" >> $@
@$(ECHO) "#define _FDICT_MICRO_ $(PROJECT_MICRO)" >> $@
@$(ECHO) "#define _FDICT_VERSION_ $(PROJECT_VERSION)" >> $@
@$(ECHO) "#endif" >> $@

# Define objects that needs compilation
SOURCES += $(src_SOURCES) fdict.inc
Expand All @@ -41,18 +41,18 @@ $(src_FPP_SOURCES): INCLUDES += -I$(src_DIR)

.PHONY: source-src
source-src: $(src_SOURCES) fdict.inc
mkdir -p $(SOURCES_DIR)/src
$(MKDIR) $(MKDIR_FLAG_PARENT) $(SOURCES_DIR)/src
mv $(src_SOURCES) fdict.inc $(SOURCES_DIR)/src


.PHONY: clean-src
clean-src:
-rm -f $(src_FPP_SOURCES)
-rm -f $(src_OBJECTS)
-rm -f *.mod fdict.inc
-rm -f $(call addpresuf,dictionary_,_.inc, funcs interface)
-rm -f $(call addpresuf,variable_,_.inc, nullify delete content funcs interface declarations declarations2)
-rm -f $(call addpresuf,variable_variable_,_.inc, set alloc assoc)
-$(RM) $(RM_FLAG_FORCE) $(src_FPP_SOURCES)
-$(RM) $(RM_FLAG_FORCE) $(src_OBJECTS)
-$(RM) $(RM_FLAG_FORCE) *.mod fdict.inc
-$(RM) $(RM_FLAG_FORCE) $(call addpresuf,dictionary_,_.inc, funcs interface)
-$(RM) $(RM_FLAG_FORCE) $(call addpresuf,variable_,_.inc, nullify delete content funcs interface declarations declarations2)
-$(RM) $(RM_FLAG_FORCE) $(call addpresuf,variable_variable_,_.inc, set alloc assoc)

clean: clean-src

Expand Down

0 comments on commit 3172fa4

Please sign in to comment.