Unverified Commit a5a1e27f authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

refactor commands in the STUBS folder for 'make serial' and 'make clean-serial'

make so that for the "serial" make target we not only automatically build
the STUBS library, if it is missing, but also update its compilation when
there are changes and remove it on the "clean-serial" target.
parent 35cee904
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -198,8 +198,8 @@ gitversion:
# shlib = shared lib in Obj_shared_machine

.DEFAULT:
	@if [ $@ = "serial" -a ! -f STUBS/libmpi_stubs.a ]; \
	  then $(MAKE) mpi-stubs; fi
	@if [ $@ = "serial" ]; \
	  then cd STUBS; $(MAKE); cd ..; fi
	@test -f MAKE/Makefile.$@ -o -f MAKE/OPTIONS/Makefile.$@ -o \
	  -f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@
	@if [ ! -d $(objdir) ]; then mkdir $(objdir); fi
@@ -256,7 +256,10 @@ clean:

clean-all:
	rm -rf Obj_*

clean-%:
	@if [ $@ = "clean-serial" ]; \
		then cd STUBS; $(MAKE) clean; cd ..; fi
	rm -rf Obj_$(@:clean-%=%) Obj_shared_$(@:clean-%=%)

# Create Makefile.list
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ ARCHFLAG = rs

# Targets

lib:	$(OBJ)
$(EXE):	$(OBJ)
	$(ARCHIVE) $(ARCHFLAG) $(EXE) $(OBJ)

clean:
@@ -41,4 +41,4 @@ clean:

# Individual dependencies

$(OBJ):	$(INC)
$(OBJ):	$(INC) ../version.h