From: Tobias Ulmer Date: Thu, 1 Oct 2015 12:31:46 +0000 (+0200) Subject: Makefile: explicitly pass build variables to genscript.sh X-Git-Tag: e2factory-2.3.14p1~15 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=0b02287ba8a2075c9c00ef28da1646836065d327;p=e2factory.git Makefile: explicitly pass build variables to genscript.sh Use $(GENSCRIPT) to call the script from any Makefile Signed-off-by: Tobias Ulmer --- diff --git a/generic/Makefile b/generic/Makefile index cd019ac..6e6ba1a 100644 --- a/generic/Makefile +++ b/generic/Makefile @@ -61,7 +61,7 @@ clean: rm -f $(CLEAN_FILES) %: %.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ %.o: %.c $(CC) $(CFLAGS) $(LUA_CPPFLAGS) $(LDFLAGS) -fPIC -o $@ -c $< diff --git a/global/Makefile b/global/Makefile index 5ad26a4..616f1f2 100644 --- a/global/Makefile +++ b/global/Makefile @@ -106,17 +106,17 @@ clean: rm -f $(CLEAN_FILES) %.lua: %.lua.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ %.sh: %.sh.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ e2: e2.lua echo "#!$(LIBEXECDIR)/e2-lua-$(LUA_VERSION)" >$@ cat $< >>$@ e2.conf: e2.conf.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ sha1.so: sha1.o lsha1.o diff --git a/local/Makefile b/local/Makefile index 1f4e311..b56922e 100644 --- a/local/Makefile +++ b/local/Makefile @@ -108,7 +108,7 @@ clean: rm -f $(CLEAN_FILES) %: %.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ linux32: linux32.c diff --git a/make.vars b/make.vars index 5cd46de..026f592 100644 --- a/make.vars +++ b/make.vars @@ -112,4 +112,15 @@ E2_SU_CFLAGS = -D CHROOT_TOOL="\"$(CHROOT_TOOL)\"" \ E2_GROUP = ebs export E2_GROUP +GENSCRIPT = env PREFIX=$(PREFIX) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) \ + LIBEXECDIR=$(LIBEXECDIR) LOCALSTATEDIR=$(LOCALSTATEDIR) \ + SYSCONFDIR=$(SYSCONFDIR) E2DATA=$(E2DATA) TOOLDIR=$(TOOLDIR) \ + LUA_VERSION=$(LUA_VERSION) ARCH=$(ARCH) \ + BINARY_STORE=$(BINARY_STORE) E2_GROUP=$(E2_GROUP) \ + ENV_TOOL=$(ENV_TOOL) CHROOT_TOOL=$(CHROOT_TOOL) \ + TAR_TOOL=$(TAR_TOOL) CHOWN_TOOL=$(CHOWN_TOOL) \ + RM_TOOL=$(RM_TOOL) DEFAULT_LOCAL_BRANCH=$(DEFAULT_LOCAL_BRANCH) \ + DEFAULT_LOCAL_TAG=$(DEFAULT_LOCAL_TAG) \ + $(TOPLEVEL)/scripts/genscript.sh + # vim: ft=make diff --git a/templates/Makefile b/templates/Makefile index 80ce7d1..a739bec 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -53,7 +53,7 @@ install-local: all install -m 644 local/source.svn $(LOCALLIBDIR)/templates/ %.sh: %.sh.in - $(TOPLEVEL)/scripts/genscript.sh $< $@ + $(GENSCRIPT) $< $@ uninstall: # do not remove possibly valuable templates