Start autogenerating the create script
authorIustin Pop <iustin@google.com>
Fri, 4 Jul 2008 19:45:54 +0000 (19:45 +0000)
committerIustin Pop <iustin@google.com>
Fri, 4 Jul 2008 19:45:54 +0000 (19:45 +0000)
This patch changes the create script to be autogenerated so that we can
use the configure-time variables.

Reviewed-by: imsnah

.gitignore
Makefile.am
create.in [moved from create with 100% similarity]

index b718fc7..ee576da 100644 (file)
@@ -1,4 +1,5 @@
 # gitignore rules
+# autotools results
 /Makefile
 /Makefile.in
 /aclocal.m4
@@ -7,4 +8,9 @@
 /config.log
 /config.status
 /configure
+
+# built scripts
+/create
+
+# archives
 /ganeti-instance-debootstrap-*.tar.gz
index 50f164e..991df92 100644 (file)
@@ -2,7 +2,18 @@ osname=$(subst ganeti-instance-,,$(PACKAGE))
 
 osdir=$(datadir)/ganeti/os/$(osname)
 
-dist_os_SCRIPTS = create import export rename
+os_SCRIPTS = create
+dist_os_SCRIPTS = import export rename
 dist_os_DATA = ganeti_api_version
 
 dist_doc_DATA = COPYING NEWS README
+
+EXTRA_DIST = create.in
+
+do_subst = sed -e 's,[@]sysconfdir[@],$(sysconfdir),g'
+
+create: create.in Makefile
+       $(do_subst) < $< > $@
+       chmod +x $@
+
+CLEANFILES = create
similarity index 100%
rename from create
rename to create.in