Project

General

Profile

« Previous | Next » 

Revision 6935

schemas/Makefile: Installation: `public/install public%/install`: Generalized to /install to allow public schema versions with any name. This requires moving `/install: %.sql` before it to override it.

View differences:

Makefile
29 29
psqlAsAdminVegbien := $(psqlAsAdmin) vegbien
30 30
psqlNoSearchPath := env no_search_path=1 ../bin/psql_script_vegbien
31 31

  
32
# Must come before `%/install: vegbien.sql` to override it
33
%/install: %.sql _always
34
	-<$< $(psqlNoSearchPath)
35
# ignore errors if schema exists
36

  
32 37
%/uninstall: _always
33 38
	@$(if $(filter public% r%,$*),$(call confirmRmPublicSchema,$*))
34 39
	echo $(call rmSchemaCmd,$*)|$(psqlNoSearchPath)
......
39 44
schema of your VegBIEN DB!,$(2))
40 45

  
41 46
# Installs a version of the public schema
42
public/install public%/install: vegbien.sql _always
47
%/install: vegbien.sql _always
43 48
	echo $(call mkSchemaCmd,$(@D))\
44 49
"COMMENT ON SCHEMA $(@D) IS 'Version: $(@D) ($(date))';"|$(psqlNoSearchPath)
45 50
	<$< $(sed) 's/( )public([,; ])/\1$(@D)\2/g'|$(psqlNoSearchPath)
......
64 69

  
65 70
#### Others
66 71

  
67
%/install: %.sql _always
68
	-<$< $(psqlNoSearchPath)
69
# ignore errors if schema exists
70

  
71 72
# Needed on Ubuntu 12.04 (also other Linuxes?) because %/reinstall is ignored.
72 73
temp/reinstall: _always temp/uninstall temp/install ;
73 74

  

Also available in: Unified diff