* [ptxdist] [PATCH v2 1/2] add install-environment
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
@ 2011-11-25 0:40 ` Andreas Bießmann
2011-12-01 18:22 ` Michael Olbrich
2011-11-25 0:40 ` [ptxdist] [PATCH v2 2/2] configure.ac: add check for GNU coreutils Andreas Bießmann
` (5 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Andreas Bießmann @ 2011-11-25 0:40 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
We add links to the bin directroy to sane tools found by configure. This
change was discussed in http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
no changes since v1
Makefile.in | 10 +++++++---
bin/ptxdist | 3 +++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 5ee1383..62fabf6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,10 +46,8 @@ dirty-check:
*-dirty) echo "refusing to install or package a dirty git tree!" ; exit 1 ;; \
esac
-install: all dirty-check
+install: all dirty-check install-environment
@echo "installing PTXdist to $(DESTDIR)$(prefix)..."
- @rm -fr "$(DESTDIR)$(instdir)"
- @mkdir -p "$(DESTDIR)$(instdir)"
@tar -C "$(abs_srcdir)" -cf - \
--exclude *~ \
--exclude .git \
@@ -74,6 +72,12 @@ install: all dirty-check
cp scripts/bash_completion "$(DESTDIR)@BASH_COMPLETION_DIR@/ptxdist"; \
fi
+install-environment: all dirty-check
+ @echo "preparing PTXdist environment in $(DESTDIR)$(instdir)/bin ..."
+ @rm -fr "$(DESTDIR)$(instdir)"
+ @mkdir -p "$(DESTDIR)$(instdir)"
+ @mkdir -p $(DESTDIR)$(instdir)/bin
+ @ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
dist: dirty-check
@rm -rf "$(project)"
diff --git a/bin/ptxdist b/bin/ptxdist
index 900af0f..81946b9 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2155,6 +2155,9 @@ setup_env() {
export LANG=C
export LC_ALL=POSIX
+
+ # ${PTXDIST_TOPDIR}/bin contains links to sane tools found by configure
+ export PATH="${PTXDIST_TOPDIR}/bin:${PATH}"
}
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ptxdist] [PATCH v2 1/2] add install-environment
2011-11-25 0:40 ` [ptxdist] [PATCH v2 1/2] " Andreas Bießmann
@ 2011-12-01 18:22 ` Michael Olbrich
2011-12-01 22:11 ` Andreas Bießmann
0 siblings, 1 reply; 25+ messages in thread
From: Michael Olbrich @ 2011-12-01 18:22 UTC (permalink / raw)
To: ptxdist
On Fri, Nov 25, 2011 at 01:40:19AM +0100, Andreas Bießmann wrote:
> We add links to the bin directroy to sane tools found by configure. This
> change was discussed in http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180
>
> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
> no changes since v1
>
> Makefile.in | 10 +++++++---
> bin/ptxdist | 3 +++
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index 5ee1383..62fabf6 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -46,10 +46,8 @@ dirty-check:
> *-dirty) echo "refusing to install or package a dirty git tree!" ; exit 1 ;; \
> esac
>
> -install: all dirty-check
> +install: all dirty-check install-environment
> @echo "installing PTXdist to $(DESTDIR)$(prefix)..."
> - @rm -fr "$(DESTDIR)$(instdir)"
> - @mkdir -p "$(DESTDIR)$(instdir)"
> @tar -C "$(abs_srcdir)" -cf - \
> --exclude *~ \
> --exclude .git \
> @@ -74,6 +72,12 @@ install: all dirty-check
> cp scripts/bash_completion "$(DESTDIR)@BASH_COMPLETION_DIR@/ptxdist"; \
> fi
>
> +install-environment: all dirty-check
> + @echo "preparing PTXdist environment in $(DESTDIR)$(instdir)/bin ..."
> + @rm -fr "$(DESTDIR)$(instdir)"
> + @mkdir -p "$(DESTDIR)$(instdir)"
> + @mkdir -p $(DESTDIR)$(instdir)/bin
> + @ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
I think this should happen during "make all". In many cases (especially
when using master) an uninstalled ptxdist is used. This should not act
differently. Something like this I think:
all: kconfig environment
kconfig:
# this was "all" before
environment:
# the new stuff to create the links.
And please add python and awk as well.
Other than that, it looks good.
Michael
>
> dist: dirty-check
> @rm -rf "$(project)"
> diff --git a/bin/ptxdist b/bin/ptxdist
> index 900af0f..81946b9 100755
> --- a/bin/ptxdist
> +++ b/bin/ptxdist
> @@ -2155,6 +2155,9 @@ setup_env() {
>
> export LANG=C
> export LC_ALL=POSIX
> +
> + # ${PTXDIST_TOPDIR}/bin contains links to sane tools found by configure
> + export PATH="${PTXDIST_TOPDIR}/bin:${PATH}"
> }
>
>
> --
> 1.7.7.4
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v2 2/2] configure.ac: add check for GNU coreutils
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 1/2] " Andreas Bießmann
@ 2011-11-25 0:40 ` Andreas Bießmann
2011-12-01 18:24 ` Michael Olbrich
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
` (4 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Andreas Bießmann @ 2011-11-25 0:40 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
Some scripts require GNU coreutils (especially the -- argument split is
problematical on BSD systems). This patch adds a macro to detect GNU coreutils
version of these tools and utilizes the macro to check for the most important
tools which break the build on Mac OS X.
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
changes since v1:
* add m4 macro to check for GNU coreutils
* squash all previous checks into one patch
Makefile.in | 4 ++++
configure.ac | 14 ++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 62fabf6..ff55638 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,6 +78,10 @@ install-environment: all dirty-check
@mkdir -p "$(DESTDIR)$(instdir)"
@mkdir -p $(DESTDIR)$(instdir)/bin
@ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
+ @ln -sf @GNU_chmod@ $(DESTDIR)$(instdir)/bin/chmod
+ @ln -sf @GNU_mv@ $(DESTDIR)$(instdir)/bin/mv
+ @ln -sf @GNU_rm@ $(DESTDIR)$(instdir)/bin/rm
+ @ln -sf @GNU_md5sum@ $(DESTDIR)$(instdir)/bin/md5sum
dist: dirty-check
@rm -rf "$(project)"
diff --git a/configure.ac b/configure.ac
index 7a34e7a..3044188 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,20 @@ case "$SED_VERSION" in
esac
AC_MSG_RESULT([$SED_VERSION])
+dnl check for gnu coreutils
+AC_DEFUN([GNU_COREUTILS],
+ [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
+ [AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
+ [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$out" = xGNU && ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
+ [AC_MSG_ERROR([could not find $1 from GNU coreutils])])])
+ AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
+
+GNU_COREUTILS(chmod)
+GNU_COREUTILS(mv)
+GNU_COREUTILS(rm)
+GNU_COREUTILS(md5sum)
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ptxdist] [PATCH v2 2/2] configure.ac: add check for GNU coreutils
2011-11-25 0:40 ` [ptxdist] [PATCH v2 2/2] configure.ac: add check for GNU coreutils Andreas Bießmann
@ 2011-12-01 18:24 ` Michael Olbrich
0 siblings, 0 replies; 25+ messages in thread
From: Michael Olbrich @ 2011-12-01 18:24 UTC (permalink / raw)
To: ptxdist
On Fri, Nov 25, 2011 at 01:40:20AM +0100, Andreas Bießmann wrote:
> Some scripts require GNU coreutils (especially the -- argument split is
> problematical on BSD systems). This patch adds a macro to detect GNU coreutils
> version of these tools and utilizes the macro to check for the most important
> tools which break the build on Mac OS X.
>
> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
> changes since v1:
> * add m4 macro to check for GNU coreutils
> * squash all previous checks into one patch
>
> Makefile.in | 4 ++++
> configure.ac | 14 ++++++++++++++
> 2 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index 62fabf6..ff55638 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -78,6 +78,10 @@ install-environment: all dirty-check
> @mkdir -p "$(DESTDIR)$(instdir)"
> @mkdir -p $(DESTDIR)$(instdir)/bin
> @ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
> + @ln -sf @GNU_chmod@ $(DESTDIR)$(instdir)/bin/chmod
> + @ln -sf @GNU_mv@ $(DESTDIR)$(instdir)/bin/mv
> + @ln -sf @GNU_rm@ $(DESTDIR)$(instdir)/bin/rm
> + @ln -sf @GNU_md5sum@ $(DESTDIR)$(instdir)/bin/md5sum
>
> dist: dirty-check
> @rm -rf "$(project)"
> diff --git a/configure.ac b/configure.ac
> index 7a34e7a..3044188 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -133,6 +133,20 @@ case "$SED_VERSION" in
> esac
> AC_MSG_RESULT([$SED_VERSION])
>
> +dnl check for gnu coreutils
> +AC_DEFUN([GNU_COREUTILS],
> + [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
> + [AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
> + [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
> + test "x$out" = xGNU && ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
> + [AC_MSG_ERROR([could not find $1 from GNU coreutils])])])
> + AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
I like it this way. We check for GNU coreutils, but if someone wants to
force anything else, the cache variable can be used to overwrite.
Michael
> +GNU_COREUTILS(chmod)
> +GNU_COREUTILS(mv)
> +GNU_COREUTILS(rm)
> +GNU_COREUTILS(md5sum)
> +
> dnl Check for egrep
> AC_PROG_EGREP
>
> --
> 1.7.7.4
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v3 0/4] add environment
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 1/2] " Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 2/2] configure.ac: add check for GNU coreutils Andreas Bießmann
@ 2011-12-01 23:30 ` Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 " Andreas Bießmann
` (4 more replies)
2011-12-01 23:30 ` [ptxdist] [PATCH v3 1/4] add environment make target Andreas Bießmann
` (3 subsequent siblings)
6 siblings, 5 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:30 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
As discussed in
http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180 add
the possibillity to have links to sane tools. And add links to required tools
for Mac OS X builds.
changes since v1:
* use macro to find GNU coreutils
changes since v2:
* use seperate environment make target to prepare the environment in sourc directory
* add awk and python to environment
Andreas Bießmann (4):
add environment make target
configure.ac: add check for GNU coreutils
add awk to environment
add python to environment
Makefile.in | 25 ++++++++++++++++++++++---
bin/ptxdist | 3 +++
configure.ac | 17 ++++++++++++++++-
3 files changed, 41 insertions(+), 4 deletions(-)
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v4 0/4] add environment
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
@ 2011-12-02 7:51 ` Andreas Bießmann
2011-12-02 15:27 ` Michael Olbrich
2011-12-02 7:51 ` [ptxdist] [PATCH v4 1/4] add environment make target Andreas Bießmann
` (3 subsequent siblings)
4 siblings, 1 reply; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-02 7:51 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
As discussed in
http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180 add
the possibillity to have links to sane tools. And add links to required tools
for Mac OS X builds.
changes since v1:
* use macro to find GNU coreutils
changes since v2:
* use seperate environment make target to prepare the environment in sourc directory
* add awk and python to environment
changes since v3:
* minor fix in 'add environment make target'
Andreas Bießmann (4):
add environment make target
configure.ac: add check for GNU coreutils
add awk to environment
add python to environment
Makefile.in | 23 +++++++++++++++++++++--
bin/ptxdist | 3 +++
configure.ac | 17 ++++++++++++++++-
3 files changed, 40 insertions(+), 3 deletions(-)
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ptxdist] [PATCH v4 0/4] add environment
2011-12-02 7:51 ` [ptxdist] [PATCH v4 " Andreas Bießmann
@ 2011-12-02 15:27 ` Michael Olbrich
0 siblings, 0 replies; 25+ messages in thread
From: Michael Olbrich @ 2011-12-02 15:27 UTC (permalink / raw)
To: ptxdist
On Fri, Dec 02, 2011 at 08:51:46AM +0100, Andreas Bießmann wrote:
> As discussed in
> http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180 add
> the possibillity to have links to sane tools. And add links to required tools
> for Mac OS X builds.
Tnx. Applied.
Michael
> changes since v1:
> * use macro to find GNU coreutils
>
> changes since v2:
> * use seperate environment make target to prepare the environment in sourc directory
> * add awk and python to environment
>
> changes since v3:
> * minor fix in 'add environment make target'
>
> Andreas Bießmann (4):
> add environment make target
> configure.ac: add check for GNU coreutils
> add awk to environment
> add python to environment
>
> Makefile.in | 23 +++++++++++++++++++++--
> bin/ptxdist | 3 +++
> configure.ac | 17 ++++++++++++++++-
> 3 files changed, 40 insertions(+), 3 deletions(-)
>
> --
> 1.7.7.4
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v4 1/4] add environment make target
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 " Andreas Bießmann
@ 2011-12-02 7:51 ` Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 2/4] configure.ac: add check for GNU coreutils Andreas Bießmann
` (2 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-02 7:51 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
The new make target 'environment' set up links to sane tools found by
configure. This change was first discussed in
http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
no changes since v1
changes since v2:
* add environment and kconfig make targets
changes since v3:
* remove unnecessary changes
Makefile.in | 10 +++++++++-
bin/ptxdist | 3 +++
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 5ee1383..7f4ea0b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -21,7 +21,9 @@ export SHELL
@BUILD_NCONF_TRUE@NCONF = nconf
-all:
+all: kconfig environment
+
+kconfig:
@echo "building conf and mconf ..."
@CC="$(CC)" \
CXX="$(CXX)" \
@@ -35,10 +37,16 @@ all:
CURSES_LOC="@CURSES_LOC@" \
conf mconf $(NCONF)
@echo "done."
+
+environment:
+ @echo -n "preparing PTXdist environment ..."
+ @ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @echo " done"
@touch .done
clean:
@rm -f .done
+ @rm -f $(abs_srcdir)/bin/sed
@$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
dirty-check:
diff --git a/bin/ptxdist b/bin/ptxdist
index 900af0f..81946b9 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2155,6 +2155,9 @@ setup_env() {
export LANG=C
export LC_ALL=POSIX
+
+ # ${PTXDIST_TOPDIR}/bin contains links to sane tools found by configure
+ export PATH="${PTXDIST_TOPDIR}/bin:${PATH}"
}
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v4 2/4] configure.ac: add check for GNU coreutils
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 " Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 1/4] add environment make target Andreas Bießmann
@ 2011-12-02 7:51 ` Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 3/4] add awk to environment Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 4/4] add python " Andreas Bießmann
4 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-02 7:51 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Some scripts require GNU coreutils (especially the -- argument split is
problematical on some BSD systems).
This patch adds a macro to detect GNU coreutils version of these tools.
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
changes since v1:
* add m4 macro to check for GNU coreutils
* squash all previous checks into one patch
no changes since v2
no changes since v3
Makefile.in | 9 ++++++++-
configure.ac | 14 ++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 7f4ea0b..56d48aa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,12 +41,20 @@ kconfig:
environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
+ @ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
+ @ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
+ @ln -sf @GNU_md5sum@ $(abs_srcdir)/bin/md5sum
@echo " done"
@touch .done
clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
+ @rm -f $(abs_srcdir)/bin/chmod
+ @rm -f $(abs_srcdir)/bin/mv
+ @rm -f $(abs_srcdir)/bin/rm
+ @rm -f $(abs_srcdir)/bin/md5sum
@$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
dirty-check:
@@ -82,7 +90,6 @@ install: all dirty-check
cp scripts/bash_completion "$(DESTDIR)@BASH_COMPLETION_DIR@/ptxdist"; \
fi
-
dist: dirty-check
@rm -rf "$(project)"
@git archive "$(project)" --prefix="$(project)"/ > "${project}.tar"
diff --git a/configure.ac b/configure.ac
index 7a34e7a..3044188 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,20 @@ case "$SED_VERSION" in
esac
AC_MSG_RESULT([$SED_VERSION])
+dnl check for gnu coreutils
+AC_DEFUN([GNU_COREUTILS],
+ [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
+ [AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
+ [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$out" = xGNU && ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
+ [AC_MSG_ERROR([could not find $1 from GNU coreutils])])])
+ AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
+
+GNU_COREUTILS(chmod)
+GNU_COREUTILS(mv)
+GNU_COREUTILS(rm)
+GNU_COREUTILS(md5sum)
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v4 3/4] add awk to environment
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
` (2 preceding siblings ...)
2011-12-02 7:51 ` [ptxdist] [PATCH v4 2/4] configure.ac: add check for GNU coreutils Andreas Bießmann
@ 2011-12-02 7:51 ` Andreas Bießmann
2011-12-02 7:51 ` [ptxdist] [PATCH v4 4/4] add python " Andreas Bießmann
4 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-02 7:51 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
new in v3
no changes since v3
Makefile.in | 2 ++
configure.ac | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 56d48aa..a46bb9d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,6 +41,7 @@ kconfig:
environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @ln -sf @AWK@ $(abs_srcdir)/bin/awk
@ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
@ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
@ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
@@ -51,6 +52,7 @@ environment:
clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
+ @rm -f $(abs_srcdir)/bin/awk
@rm -f $(abs_srcdir)/bin/chmod
@rm -f $(abs_srcdir)/bin/mv
@rm -f $(abs_srcdir)/bin/rm
diff --git a/configure.ac b/configure.ac
index 3044188..a59a58e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,7 @@ fi
dnl Check for awk
AC_PROG_AWK
+AC_PATH_PROGS(AWK, ${AWK},)
AC_MSG_CHECKING([awk version])
AWK_VERSION=`$AWK --version 2>/dev/null | $SED -ne "s/GNU [[Aa]]wk \([[0-9\.]]*\)/\1/p"`
case "$AWK_VERSION" in
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v4 4/4] add python to environment
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
` (3 preceding siblings ...)
2011-12-02 7:51 ` [ptxdist] [PATCH v4 3/4] add awk to environment Andreas Bießmann
@ 2011-12-02 7:51 ` Andreas Bießmann
4 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-02 7:51 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
new in v3
no changes since v3
Makefile.in | 2 ++
configure.ac | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index a46bb9d..d9fd554 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,6 +42,7 @@ environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
@ln -sf @AWK@ $(abs_srcdir)/bin/awk
+ @ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
@ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
@ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
@@ -53,6 +54,7 @@ clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
@rm -f $(abs_srcdir)/bin/awk
+ @rm -f $(abs_srcdir)/bin/python
@rm -f $(abs_srcdir)/bin/chmod
@rm -f $(abs_srcdir)/bin/mv
@rm -f $(abs_srcdir)/bin/rm
diff --git a/configure.ac b/configure.ac
index a59a58e..ade61da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,7 +350,7 @@ AC_ARG_WITH(python, AS_HELP_STRING([--with-python],[name of the python executabl
AC_SUBST(PYTHON)
AC_MSG_NOTICE([Using python executable $PYTHON])
],[
- PYTHON="python"
+ AC_PATH_PROGS(PYTHON, python2.7 python2.6 python)
AC_SUBST(PYTHON)
])
dnl
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v3 1/4] add environment make target
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
` (2 preceding siblings ...)
2011-12-01 23:30 ` [ptxdist] [PATCH v3 0/4] add environment Andreas Bießmann
@ 2011-12-01 23:30 ` Andreas Bießmann
2011-12-01 23:41 ` Andreas Bießmann
2011-12-01 23:30 ` [ptxdist] [PATCH v3 2/4] configure.ac: add check for GNU coreutils Andreas Bießmann
` (2 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:30 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
The new make target 'environment' set up links to sane tools found by
configure. This change was first discussed in
http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8157/focus=8180
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
no changes since v1
changes since v2:
* add environment and kconfig make targets
Makefile.in | 12 ++++++++++--
bin/ptxdist | 3 +++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 5ee1383..01d1a87 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -21,7 +21,9 @@ export SHELL
@BUILD_NCONF_TRUE@NCONF = nconf
-all:
+all: kconfig environment
+
+kconfig:
@echo "building conf and mconf ..."
@CC="$(CC)" \
CXX="$(CXX)" \
@@ -35,10 +37,16 @@ all:
CURSES_LOC="@CURSES_LOC@" \
conf mconf $(NCONF)
@echo "done."
+
+environment:
+ @echo -n "preparing PTXdist environment ..."
+ @ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @echo " done"
@touch .done
clean:
@rm -f .done
+ @rm -f $(abs_srcdir)/bin/sed
@$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
dirty-check:
@@ -47,9 +55,9 @@ dirty-check:
esac
install: all dirty-check
- @echo "installing PTXdist to $(DESTDIR)$(prefix)..."
@rm -fr "$(DESTDIR)$(instdir)"
@mkdir -p "$(DESTDIR)$(instdir)"
+ @echo "installing PTXdist to $(DESTDIR)$(prefix)..."
@tar -C "$(abs_srcdir)" -cf - \
--exclude *~ \
--exclude .git \
diff --git a/bin/ptxdist b/bin/ptxdist
index 900af0f..81946b9 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2155,6 +2155,9 @@ setup_env() {
export LANG=C
export LC_ALL=POSIX
+
+ # ${PTXDIST_TOPDIR}/bin contains links to sane tools found by configure
+ export PATH="${PTXDIST_TOPDIR}/bin:${PATH}"
}
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ptxdist] [PATCH v3 1/4] add environment make target
2011-12-01 23:30 ` [ptxdist] [PATCH v3 1/4] add environment make target Andreas Bießmann
@ 2011-12-01 23:41 ` Andreas Bießmann
0 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:41 UTC (permalink / raw)
To: ptxdist
Am 02.12.2011 um 00:30 schrieb Andreas Bießmann:
> @@ -47,9 +55,9 @@ dirty-check:
> esac
>
> install: all dirty-check
> - @echo "installing PTXdist to $(DESTDIR)$(prefix)..."
> @rm -fr "$(DESTDIR)$(instdir)"
> @mkdir -p "$(DESTDIR)$(instdir)"
> + @echo "installing PTXdist to $(DESTDIR)$(prefix)…"
hmpf .. that shouldn't go into the repo …
will provide another patch tomorrow
best regards
Andreas Bießmann
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v3 2/4] configure.ac: add check for GNU coreutils
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
` (3 preceding siblings ...)
2011-12-01 23:30 ` [ptxdist] [PATCH v3 1/4] add environment make target Andreas Bießmann
@ 2011-12-01 23:30 ` Andreas Bießmann
2011-12-01 23:30 ` [ptxdist] [PATCH v3 3/4] add awk to environment Andreas Bießmann
2011-12-01 23:30 ` [ptxdist] [PATCH v3 4/4] add python " Andreas Bießmann
6 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:30 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Some scripts require GNU coreutils (especially the -- argument split is
problematical on some BSD systems).
This patch adds a macro to detect GNU coreutils version of these tools.
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
changes since v1:
* add m4 macro to check for GNU coreutils
* squash all previous checks into one patch
no changes since v2
Makefile.in | 9 ++++++++-
configure.ac | 14 ++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 01d1a87..0014c78 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,12 +41,20 @@ kconfig:
environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
+ @ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
+ @ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
+ @ln -sf @GNU_md5sum@ $(abs_srcdir)/bin/md5sum
@echo " done"
@touch .done
clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
+ @rm -f $(abs_srcdir)/bin/chmod
+ @rm -f $(abs_srcdir)/bin/mv
+ @rm -f $(abs_srcdir)/bin/rm
+ @rm -f $(abs_srcdir)/bin/md5sum
@$(MAKE) -C "$(abs_srcdir)/scripts/kconfig" clean
dirty-check:
@@ -82,7 +90,6 @@ install: all dirty-check
cp scripts/bash_completion "$(DESTDIR)@BASH_COMPLETION_DIR@/ptxdist"; \
fi
-
dist: dirty-check
@rm -rf "$(project)"
@git archive "$(project)" --prefix="$(project)"/ > "${project}.tar"
diff --git a/configure.ac b/configure.ac
index 7a34e7a..3044188 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,20 @@ case "$SED_VERSION" in
esac
AC_MSG_RESULT([$SED_VERSION])
+dnl check for gnu coreutils
+AC_DEFUN([GNU_COREUTILS],
+ [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
+ [AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
+ [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$out" = xGNU && ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
+ [AC_MSG_ERROR([could not find $1 from GNU coreutils])])])
+ AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
+
+GNU_COREUTILS(chmod)
+GNU_COREUTILS(mv)
+GNU_COREUTILS(rm)
+GNU_COREUTILS(md5sum)
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v3 3/4] add awk to environment
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
` (4 preceding siblings ...)
2011-12-01 23:30 ` [ptxdist] [PATCH v3 2/4] configure.ac: add check for GNU coreutils Andreas Bießmann
@ 2011-12-01 23:30 ` Andreas Bießmann
2011-12-01 23:30 ` [ptxdist] [PATCH v3 4/4] add python " Andreas Bießmann
6 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:30 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
new in v3
Makefile.in | 2 ++
configure.ac | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 0014c78..ea9c125 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,6 +41,7 @@ kconfig:
environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
+ @ln -sf @AWK@ $(abs_srcdir)/bin/awk
@ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
@ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
@ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
@@ -51,6 +52,7 @@ environment:
clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
+ @rm -f $(abs_srcdir)/bin/awk
@rm -f $(abs_srcdir)/bin/chmod
@rm -f $(abs_srcdir)/bin/mv
@rm -f $(abs_srcdir)/bin/rm
diff --git a/configure.ac b/configure.ac
index 3044188..a59a58e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,7 @@ fi
dnl Check for awk
AC_PROG_AWK
+AC_PATH_PROGS(AWK, ${AWK},)
AC_MSG_CHECKING([awk version])
AWK_VERSION=`$AWK --version 2>/dev/null | $SED -ne "s/GNU [[Aa]]wk \([[0-9\.]]*\)/\1/p"`
case "$AWK_VERSION" in
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH v3 4/4] add python to environment
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
` (5 preceding siblings ...)
2011-12-01 23:30 ` [ptxdist] [PATCH v3 3/4] add awk to environment Andreas Bießmann
@ 2011-12-01 23:30 ` Andreas Bießmann
6 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 23:30 UTC (permalink / raw)
To: PTXdist ML; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
new in v3
Makefile.in | 2 ++
configure.ac | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index ea9c125..dab9e55 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,6 +42,7 @@ environment:
@echo -n "preparing PTXdist environment ..."
@ln -sf @SED@ $(abs_srcdir)/bin/sed
@ln -sf @AWK@ $(abs_srcdir)/bin/awk
+ @ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @GNU_chmod@ $(abs_srcdir)/bin/chmod
@ln -sf @GNU_mv@ $(abs_srcdir)/bin/mv
@ln -sf @GNU_rm@ $(abs_srcdir)/bin/rm
@@ -53,6 +54,7 @@ clean:
@rm -f .done
@rm -f $(abs_srcdir)/bin/sed
@rm -f $(abs_srcdir)/bin/awk
+ @rm -f $(abs_srcdir)/bin/python
@rm -f $(abs_srcdir)/bin/chmod
@rm -f $(abs_srcdir)/bin/mv
@rm -f $(abs_srcdir)/bin/rm
diff --git a/configure.ac b/configure.ac
index a59a58e..ade61da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,7 +350,7 @@ AC_ARG_WITH(python, AS_HELP_STRING([--with-python],[name of the python executabl
AC_SUBST(PYTHON)
AC_MSG_NOTICE([Using python executable $PYTHON])
],[
- PYTHON="python"
+ AC_PATH_PROGS(PYTHON, python2.7 python2.6 python)
AC_SUBST(PYTHON)
])
dnl
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread