diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index c27004e..c156806 100644
*** a/src/makefiles/pgxs.mk
--- b/src/makefiles/pgxs.mk
*************** check:
*** 282,291 ****
  else
  check: submake $(REGRESS_PREP)
  	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
  
  temp-install: EXTRA_INSTALL+=$(subdir)
  endif
- endif # REGRESS
  
  
  # STANDARD RULES
--- 282,293 ----
  else
  check: submake $(REGRESS_PREP)
  	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
+ endif
+ endif # REGRESS
  
+ ifndef PGXS
  temp-install: EXTRA_INSTALL+=$(subdir)
  endif
  
  
  # STANDARD RULES
