Subject: [alpine-devel] [PATCH] patch and 2 questions for alpine-conf repo

From: Dubiousjim <[email-masked]>
Date: Fri, 5 Jul 2013 00:46:10 -0400

Thanks for applying the alpine-conf patches I sent the other day, but this is still
needed to clean up the VERSION reference. (Sorry for sending the bad patch in the first place here.)

Also:

Q1. Like abuild, I notice this Makefile also has a "dist" target. Might we still use that? If not should we purge it?

Q2. There's also a funny extension target, for the extension ".sh.in.sh". Is that correct, or a typo?

The abuild repo's Makefile has:

	.SUFFIXES:      .sh.in .in
	%.sh: %.sh.in
	        ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
	        ${CHMOD} +x $@
	
	%: %.in
	        ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
	        ${CHMOD} +x $@

which makes natural sense. Whereas alpine-conf's Makefile has:

	.SUFFIXES:      .sh.in .in
	.sh.in.sh:
	        ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
	
	.in:
	        ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@

On the face of it, those rules look screwy, but maybe there's some (overly?) clever
Makefile-fu going on here that I haven't divined.

Dubiousjim (1):
  update-conf: fix version

 update-conf.in | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.8.3.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 8 Jul 2013 15:09:56 +0200

On Fri,  5 Jul 2013 00:46:10 -0400

> needed to clean up the VERSION reference. (Sorry for sending the bad patch in the first place here.)

No problem. We expect high quality, but not perfectionism.

Thanks for fixing it.

> Q1. Like abuild, I notice this Makefile also has a "dist" target. Might we still use that? If not should we purge it?

We purge it.

> Makefile-fu going on here that I haven't divined.

It is old fashioned suffix rules that are obsolete. We should use former.

http://www.gnu.org/software/make/manual/make.html#Suffix-Rules

>  1 file changed, 2 insertions(+)

applied that. thanks!

---

---

From: Dubiousjim <[email-masked]>
Date: Wed, 17 Jul 2013 10:09:35 -0400

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index aff475a..8f1b113 100644
--- a/Makefile
+++ b/Makefile
@@ -53,10 +53,10 @@ SED_REPLACE	:= -e 's:@VERSION@:$(FULL_VERSION):g' \
 			-e 's:@sysconfdir@:$(sysconfdir):g'
 
 .SUFFIXES:	.sh.in .in
-.sh.in.sh:
+%.sh: %.sh.in
 
-.in:
+%: %.in
 
 .PHONY:	all apk clean install uninstall
-- 
1.8.3.3

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 19 Jul 2013 16:12:59 +0200

On Wed, 17 Jul 2013 10:09:35 -0400

>  1 file changed, 2 insertions(+), 2 deletions(-)
applied. thanks!

-nc

---

---

From: Dubiousjim <[email-masked]>
Date: Wed, 17 Jul 2013 10:09:34 -0400

---
 Makefile | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/Makefile b/Makefile
index 59d4e0a..aff475a 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,7 @@ VERSION		:= 2.13.0
 
 sysconfdir      ?= /etc/lbu
 
-P		:= alpine-conf
-PV		:= $(P)-$(VERSION)
-TARBZ2		:= $(PV).tar.bz2
 PREFIX		?=
-TMP		:= $(PV)
 
 LIB_FILES	:= libalpine.sh
 SBIN_FILES	:= lbu\
@@ -34,12 +30,8 @@ SBIN_FILES	:= lbu\
 BIN_FILES	:= uniso
 
 SCRIPTS		:= $(LIB_FILES) $(SBIN_FILES)
-SCRIPT_SOURCES	:= $(addsuffix .in,$(SCRIPTS))
-
 
 ETC_LBU_FILES	:= lbu.conf
-EXTRA_DIST	:= Makefile README
-DIST_FILES	:= $(SCRIPT_SOURCES) $(ETC_LBU_FILES) $(EXTRA_DIST)
 
 GIT_REV		:= $(shell test -d .git && git describe || echo exported)
 ifneq ($(GIT_REV), exported)
@@ -55,7 +47,6 @@ WWW="http://alpinelinux.org/alpine-conf"

 SED		:= sed
-TAR		:= tar
 
 SED_REPLACE	:= -e 's:@VERSION@:$(FULL_VERSION):g' \
 			-e 's:@PREFIX@:$(PREFIX):g' \
@@ -68,23 +59,13 @@ SED_REPLACE	:= -e 's:@VERSION@:$(FULL_VERSION):g' \
 .in:
 	${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
 
-.PHONY:	all apk clean dist install uninstall
+.PHONY:	all apk clean install uninstall
 all:	$(SCRIPTS) $(BIN_FILES)
 
 uniso:	uniso.c
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 apk:	$(APKF)
-
-dist:	$(TARBZ2)
-
-
-$(TARBZ2): $(DIST_FILES)
-	rm -rf $(TMP)
-	mkdir -p $(TMP)
-	cp $(DIST_FILES) $(TMP)
-	$(TAR) -cjf $@ $(TMP)
-	rm -rf $(TMP)
 	
 install: $(BIN_FILES) $(SBIN_FILES) $(LIB_FILES) $(ETC_LBU_FILES)
 	install -m 755 -d $(DESTDIR)/$(PREFIX)/bin
@@ -105,5 +86,5 @@ uninstall:
 	done
 	
 clean:
-	rm -rf $(SCRIPTS) $(BIN_FILES) $(TMP) $(TARBZ2)
+	rm -rf $(SCRIPTS) $(BIN_FILES)
 
-- 
1.8.3.3

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 19 Jul 2013 16:12:41 +0200

On Wed, 17 Jul 2013 10:09:34 -0400

applied. thanks!

-nc

---

---

From: Dubiousjim <[email-masked]>
Date: Fri, 5 Jul 2013 00:46:11 -0400

---
 update-conf.in | 2 ++

diff --git a/update-conf.in b/update-conf.in
index 18e4e7d..f287dd9 100644
--- a/update-conf.in
+++ b/update-conf.in
@@ -2,6 +2,8 @@

 PREFIX=
+VERSION=@VERSION@
+
 . $PREFIX/lib/libalpine.sh
 
 # set up temp dir
-- 
1.8.3.1

---