Message ID | 20160805210657.11963-1-patrick@stwcx.xyz |
---|---|
State | Rejected |
Headers | show |
On Fri, Aug 05, 2016 at 04:06:57PM -0500, Patrick Williams wrote: > Distro packaging tools typically use PREFIX instead of prefix, > so change all references to lower-case prefix to upper-case. > > pflash uses PREFIX since at least b2649b. > > Signed-off-by: Patrick Williams <patrick@stwcx.xyz> > --- After I wrote this patch and cross-referenced with the existing openbmc bitbake recipe, I'm not convinced that "PREFIX" or "prefix" is any more standard than the other. Maybe someone else can speak to that. The existing pflash code uses 'PREFIX' though and so this patch at least makes them consistent. This allows me to use the same basic recipe for both pflash and gard.
Patrick Williams <patrick@stwcx.xyz> writes: > On Fri, Aug 05, 2016 at 04:06:57PM -0500, Patrick Williams wrote: >> Distro packaging tools typically use PREFIX instead of prefix, >> so change all references to lower-case prefix to upper-case. >> >> pflash uses PREFIX since at least b2649b. >> >> Signed-off-by: Patrick Williams <patrick@stwcx.xyz> >> --- > > After I wrote this patch and cross-referenced with the existing openbmc > bitbake recipe, I'm not convinced that "PREFIX" or "prefix" is any more > standard than the other. Maybe someone else can speak to that. https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html and https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html all point to prefix rather than PREFIX, so maybe we should go that way. I'll send a patch, feel free to try it out and review/ack/nak depending on result :)
diff --git a/external/gard/rules.mk b/external/gard/rules.mk index 0dd14ed..dfe93d5 100644 --- a/external/gard/rules.mk +++ b/external/gard/rules.mk @@ -7,9 +7,9 @@ OBJS += $(LIBFLASH_OBJS) OBJS += common-arch_flash.o EXE = gard -prefix = /usr/local/ -sbindir = $(prefix)/sbin -datadir = $(prefix)/share +PREFIX = /usr/local/ +sbindir = $(PREFIX)/sbin +datadir = $(PREFIX)/share mandir = $(datadir)/man GARD_VERSION ?= $(shell ./make_version.sh $(EXE)) diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile index 7482af3..8318348 100644 --- a/external/opal-prd/Makefile +++ b/external/opal-prd/Makefile @@ -3,9 +3,9 @@ LDFLAGS += -m64 ASFLAGS = -m64 CPPFLAGS += -I. -I../../include -I../../ -prefix = /usr/local/ -sbindir = $(prefix)/sbin -datadir = $(prefix)/share +PREFIX = /usr/local/ +sbindir = $(PREFIX)/sbin +datadir = $(PREFIX)/share mandir = $(datadir)/man all: links arch_links | opal-prd diff --git a/external/xscom-utils/Makefile b/external/xscom-utils/Makefile index 3fee247..9695105 100644 --- a/external/xscom-utils/Makefile +++ b/external/xscom-utils/Makefile @@ -3,9 +3,9 @@ CC = $(CROSS_COMPILE)gcc XSCOM_VERSION ?= $(shell ../../make_version.sh xscom-utils) CFLAGS += -O2 -g -Wall -m64 -prefix = /usr/local/ -sbindir = $(prefix)/sbin -datadir = $(prefix)/share +PREFIX = /usr/local/ +sbindir = $(PREFIX)/sbin +datadir = $(PREFIX)/share mandir = $(datadir)/man %.o: %.c
Distro packaging tools typically use PREFIX instead of prefix, so change all references to lower-case prefix to upper-case. pflash uses PREFIX since at least b2649b. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> --- external/gard/rules.mk | 6 +++--- external/opal-prd/Makefile | 6 +++--- external/xscom-utils/Makefile | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)