Browse Source

Add a data to buildconf.py

It a real buildtime variable, the localestatedir
Yann Weber 8 years ago
parent
commit
43ca4e4c52
3 changed files with 12 additions and 1 deletions
  1. 1
    1
      configure.ac
  2. 9
    0
      lodel/Makefile.am
  3. 2
    0
      lodel/buildconf.py.am.in

+ 1
- 1
configure.ac View File

@@ -3,7 +3,7 @@ AC_INIT([lodel], [0.1], [contact@openedition.org])
3 3
 AM_INIT_AUTOMAKE
4 4
 
5 5
 AC_CONFIG_FILES([Makefile \
6
-	lodel/buildconf.py \
6
+	lodel/buildconf.py.am \
7 7
 	lodel/Makefile \
8 8
 	lodel/auth/Makefile \
9 9
 	lodel/editorial_model/Makefile \

+ 9
- 0
lodel/Makefile.am View File

@@ -1,9 +1,18 @@
1 1
 SUBDIRS=auth editorial_model leapi plugin settings utils
2 2
 
3 3
 lodel_PYTHON = *.py
4
+CLEANFILES = buildconf.py
5
+
6
+
7
+all-local: buildconf.py
4 8
 
5 9
 lodeldir=$(pkgpythondir)/
6 10
 
7 11
 distclean-local:
8 12
 	-rm Makefile Makefile.in
9 13
 
14
+do_subst = sed -e 's,\[@\]LODEL2_VARDIR\[@\],$(localstatedir)/lodel2/,g'
15
+
16
+buildconf.py: buildconf.py.am
17
+	$(do_subst) < $(srcdir)/buildconf.py.am > buildconf.py
18
+

lodel/buildconf.py.in → lodel/buildconf.py.am.in View File

@@ -3,3 +3,5 @@
3 3
 
4 4
 PYMONGO=@PYMONGO@
5 5
 WEBUI=@WEBUI@
6
+#Populated by make
7
+LODEL2VARDIR="[@]LODEL2_VARDIR[@]"

Loading…
Cancel
Save