Project

General

Profile

« Previous | Next » 

Revision 6982

schemas/Makefile: Use $* instead of $(@D) for clarity. $(@D) is only needed when the dir part of the target includes a prefix in addition to the % stem.

View differences:

Makefile
50 50

  
51 51
# Installs a version of the public schema
52 52
%/install: vegbien.sql _always
53
	echo $(call mkSchemaCmd,$(@D))\
54
"COMMENT ON SCHEMA $(@D) IS 'Version: $(@D) ($(date))';"|$(psqlNoSearchPath)
55
	<$< $(sed) 's/( )public([,; ])/\1$(@D)\2/g'|$(psqlNoSearchPath)
53
	echo $(call mkSchemaCmd,$*)\
54
"COMMENT ON SCHEMA $* IS 'Version: $* ($(date))';"|$(psqlNoSearchPath)
55
	<$< $(sed) 's/( )public([,; ])/\1$*\2/g'|$(psqlNoSearchPath)
56 56

  
57 57
# Replaces the current public schema with the given version
58 58
%/publish: _always
59 59
	@$(call confirmRmPublicSchema,public,To save it: make schemas/rotate)
60 60
	echo $(call rmSchemaCmd,public)\
61
'ALTER SCHEMA "$(@D)" RENAME TO public;'|$(psqlNoSearchPath) --single-transaction
61
'ALTER SCHEMA "$*" RENAME TO public;'|$(psqlNoSearchPath) --single-transaction
62 62
	@echo $(emph)'In your shell, run:'$(endEmph)'unset version'
63 63

  
64 64
rename/%: _always

Also available in: Unified diff