mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Allwmake: improved '-update' option to handle out-of-date '.dep' files
Patch contributed by Bruno Santos Resolves bug-report http://bugs.openfoam.org/view.php?id=2091
This commit is contained in:
@ -47,7 +47,7 @@ SFILES = $(OBJECTS_DIR)/sourceFiles
|
|||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Declare dependecy of all make system files on FILES
|
# Declare dependency of all make system files on FILES
|
||||||
# Causes all derived files to be remade if any are changed or missing
|
# Causes all derived files to be remade if any are changed or missing
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -184,7 +184,7 @@ lnInclude: $(MAKE_DIR)/files $(MAKE_DIR)/options
|
|||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Declare all qbject files depend on $(OBJECTS_DIR)/options
|
# Declare all object files depend on $(OBJECTS_DIR)/options
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
$(OBJECTS) : $(OBJECTS_DIR)/options
|
$(OBJECTS) : $(OBJECTS_DIR)/options
|
||||||
@ -192,13 +192,15 @@ $(foreach S,$(SOURCE),$(eval $(OBJECTS_DIR)/$(basename $S).o : $(OBJECTS_DIR)/$S
|
|||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set depedency rule and include dependency lists
|
# Set dependency rule and include dependency lists
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.PHONY: dep
|
.PHONY: dep updatedep
|
||||||
dep: $(DEPENDENCIES)
|
dep: $(DEPENDENCIES)
|
||||||
|
|
||||||
ifeq ($(findstring lnInclude,$(MAKECMDGOALS)),)
|
updatedep: dep
|
||||||
|
|
||||||
|
ifeq ($(findstring lnInclude,$(MAKECMDGOALS))$(findstring updatedep,$(MAKECMDGOALS)),)
|
||||||
-include $(DEPENDENCIES)
|
-include $(DEPENDENCIES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -127,6 +127,9 @@ do
|
|||||||
-update)
|
-update)
|
||||||
wrmdep -update
|
wrmdep -update
|
||||||
wmakeLnIncludeAll
|
wmakeLnIncludeAll
|
||||||
|
|
||||||
|
# Set WM_UPDATE_DEPENDENCIES, so that wmake will pick up on it
|
||||||
|
export WM_UPDATE_DEPENDENCIES=yes
|
||||||
;;
|
;;
|
||||||
# Generate documentation
|
# Generate documentation
|
||||||
doc)
|
doc)
|
||||||
|
|||||||
21
wmake/wmake
21
wmake/wmake
@ -82,6 +82,7 @@ or a special target:
|
|||||||
libo Compile statically linked lib (.o)
|
libo Compile statically linked lib (.o)
|
||||||
libso Compile dynamically linked lib (.so)
|
libso Compile dynamically linked lib (.so)
|
||||||
dep Compile lnInclude and dependencies only
|
dep Compile lnInclude and dependencies only
|
||||||
|
updatedep Compile dependencies only (in case of broken dependencies)
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
@ -378,6 +379,26 @@ case "$targetType" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# When WM_UPDATE_DEPENDENCIES is set, use forced dependency files update
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -n "$WM_UPDATE_DEPENDENCIES" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
$make -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
|
||||||
|
OBJECTS_DIR=$objectsDir updatedep
|
||||||
|
makeExitCode=$?
|
||||||
|
|
||||||
|
if [ $makeExitCode -ne 0 ]
|
||||||
|
then
|
||||||
|
exit $makeExitCode
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset makeExitCode
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Make the dependency files or object files and link
|
# Make the dependency files or object files and link
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user