* [ptxdist] [PATCH 0/5] add install-environment
@ 2011-10-21 19:53 Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 1/5] " Andreas Bießmann
` (5 more replies)
0 siblings, 6 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 UTC (permalink / raw)
To: ptxdist; +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.
Andreas Bießmann (5):
add install-environment
configure.ac: add check for chmod from GNU coreutils
configure.ac: add check for mv from GNU coreutils
configrue.ac: add check for rm from GNU coreutils
configrue.ac: add check for md5sum from GNU coreutils
Makefile.in | 14 +++++++++++---
bin/ptxdist | 3 +++
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 3 deletions(-)
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH 1/5] add install-environment
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
@ 2011-10-21 19:53 ` Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils Andreas Bießmann
` (4 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 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>
---
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
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 1/5] " Andreas Bießmann
@ 2011-10-21 19:53 ` Andreas Bießmann
2011-10-27 15:10 ` Michael Olbrich
2011-10-21 19:53 ` [ptxdist] [PATCH 3/5] configure.ac: add check for mv " Andreas Bießmann
` (3 subsequent siblings)
5 siblings, 1 reply; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
Makefile.in | 1 +
configure.ac | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 62fabf6..eb775de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,6 +78,7 @@ install-environment: all dirty-check
@mkdir -p "$(DESTDIR)$(instdir)"
@mkdir -p $(DESTDIR)$(instdir)/bin
@ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
+ @ln -sf @GNUCHMOD@ $(DESTDIR)$(instdir)/bin/chmod
dist: dirty-check
@rm -rf "$(project)"
diff --git a/configure.ac b/configure.ac
index 7a34e7a..e155403 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,15 @@ case "$SED_VERSION" in
esac
AC_MSG_RESULT([$SED_VERSION])
+dnl check for chmod GNU version
+AC_CACHE_CHECK([for chmod from GNU coreutils], [ac_cv_path_GNUCHMOD],
+ [AC_PATH_PROGS_FEATURE_CHECK([GNUCHMOD], [chmod gchmod],
+ [[gnuchmodout=`$ac_path_GNUCHMOD --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$gnuchmodout" = xGNU \
+ && ac_cv_path_GNUCHMOD=$ac_path_GNUCHMOD ac_path_GNUCHMOD_found=:]],
+ [AC_MSG_ERROR([could not find chmod from GNU coreutils])])])
+AC_SUBST([GNUCHMOD], [$ac_cv_path_GNUCHMOD])
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH 3/5] configure.ac: add check for mv from GNU coreutils
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 1/5] " Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils Andreas Bießmann
@ 2011-10-21 19:53 ` Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 4/5] configrue.ac: add check for rm " Andreas Bießmann
` (2 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
Makefile.in | 1 +
configure.ac | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index eb775de..6fa1259 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -79,6 +79,7 @@ install-environment: all dirty-check
@mkdir -p $(DESTDIR)$(instdir)/bin
@ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
@ln -sf @GNUCHMOD@ $(DESTDIR)$(instdir)/bin/chmod
+ @ln -sf @GNUMV@ $(DESTDIR)$(instdir)/bin/mv
dist: dirty-check
@rm -rf "$(project)"
diff --git a/configure.ac b/configure.ac
index e155403..0898450 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,15 @@ AC_CACHE_CHECK([for chmod from GNU coreutils], [ac_cv_path_GNUCHMOD],
[AC_MSG_ERROR([could not find chmod from GNU coreutils])])])
AC_SUBST([GNUCHMOD], [$ac_cv_path_GNUCHMOD])
+dnl check for mv GNU version
+AC_CACHE_CHECK([for mv from GNU coreutils], [ac_cv_path_GNUMV],
+ [AC_PATH_PROGS_FEATURE_CHECK([GNUMV], [gmv mv.gnu mv],
+ [[gnumvout=`$ac_path_GNUMV --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$gnumvout" = xGNU \
+ && ac_cv_path_GNUMV=$ac_path_GNUMV ac_path_GNUMV_found=:]],
+ [AC_MSG_ERROR([could not find mv from GNU coreutils])])])
+AC_SUBST([GNUMV], [$ac_cv_path_GNUMV])
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH 4/5] configrue.ac: add check for rm from GNU coreutils
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
` (2 preceding siblings ...)
2011-10-21 19:53 ` [ptxdist] [PATCH 3/5] configure.ac: add check for mv " Andreas Bießmann
@ 2011-10-21 19:53 ` Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 5/5] configrue.ac: add check for md5sum " Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
5 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
Makefile.in | 1 +
configure.ac | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 6fa1259..3c9441c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -80,6 +80,7 @@ install-environment: all dirty-check
@ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
@ln -sf @GNUCHMOD@ $(DESTDIR)$(instdir)/bin/chmod
@ln -sf @GNUMV@ $(DESTDIR)$(instdir)/bin/mv
+ @ln -sf @GNURM@ $(DESTDIR)$(instdir)/bin/rm
dist: dirty-check
@rm -rf "$(project)"
diff --git a/configure.ac b/configure.ac
index 0898450..731e1f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,15 @@ AC_CACHE_CHECK([for mv from GNU coreutils], [ac_cv_path_GNUMV],
[AC_MSG_ERROR([could not find mv from GNU coreutils])])])
AC_SUBST([GNUMV], [$ac_cv_path_GNUMV])
+dnl check for rm GNU version
+AC_CACHE_CHECK([for rm from GNU coreutils], [ac_cv_path_GNURM],
+ [AC_PATH_PROGS_FEATURE_CHECK([GNURM], [grm rm.gnu rm],
+ [[gnurmout=`$ac_path_GNURM --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$gnurmout" = xGNU \
+ && ac_cv_path_GNURM=$ac_path_GNURM ac_path_GNURM_found=:]],
+ [AC_MSG_ERROR([could not find rm from GNU coreutils])])])
+AC_SUBST([GNURM], [$ac_cv_path_GNURM])
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [ptxdist] [PATCH 5/5] configrue.ac: add check for md5sum from GNU coreutils
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
` (3 preceding siblings ...)
2011-10-21 19:53 ` [ptxdist] [PATCH 4/5] configrue.ac: add check for rm " Andreas Bießmann
@ 2011-10-21 19:53 ` Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 0/2] add install-environment Andreas Bießmann
5 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-10-21 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Andreas Bießmann
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
Makefile.in | 1 +
configure.ac | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 3c9441c..53d4f83 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -81,6 +81,7 @@ install-environment: all dirty-check
@ln -sf @GNUCHMOD@ $(DESTDIR)$(instdir)/bin/chmod
@ln -sf @GNUMV@ $(DESTDIR)$(instdir)/bin/mv
@ln -sf @GNURM@ $(DESTDIR)$(instdir)/bin/rm
+ @ln -sf @GNUMD5SUM@ $(DESTDIR)$(instdir)/bin/md5sum
dist: dirty-check
@rm -rf "$(project)"
diff --git a/configure.ac b/configure.ac
index 731e1f2..0c943ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,6 +160,15 @@ AC_CACHE_CHECK([for rm from GNU coreutils], [ac_cv_path_GNURM],
[AC_MSG_ERROR([could not find rm from GNU coreutils])])])
AC_SUBST([GNURM], [$ac_cv_path_GNURM])
+dnl check for md5sum GNU version
+AC_CACHE_CHECK([for md5sum from GNU coreutils], [ac_cv_path_GNUMD5SUM],
+ [AC_PATH_PROGS_FEATURE_CHECK([GNUMD5SUM], [gmd5sum md5sum.gnu md5sum],
+ [[gnumd5sumout=`$ac_path_GNUMD5SUM --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ test "x$gnumd5sumout" = xGNU \
+ && ac_cv_path_GNUMD5SUM=$ac_path_GNUMD5SUM ac_path_GNUMD5SUM_found=:]],
+ [AC_MSG_ERROR([could not find md5sum from GNU coreutils])])])
+AC_SUBST([GNUMD5SUM], [$ac_cv_path_GNUMD5SUM])
+
dnl Check for egrep
AC_PROG_EGREP
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils
2011-10-21 19:53 ` [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils Andreas Bießmann
@ 2011-10-27 15:10 ` Michael Olbrich
0 siblings, 0 replies; 25+ messages in thread
From: Michael Olbrich @ 2011-10-27 15:10 UTC (permalink / raw)
To: ptxdist
On Fri, Oct 21, 2011 at 09:53:29PM +0200, Andreas Bießmann wrote:
> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
> Makefile.in | 1 +
> configure.ac | 9 +++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index 62fabf6..eb775de 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -78,6 +78,7 @@ install-environment: all dirty-check
> @mkdir -p "$(DESTDIR)$(instdir)"
> @mkdir -p $(DESTDIR)$(instdir)/bin
> @ln -sf @SED@ $(DESTDIR)$(instdir)/bin/sed
> + @ln -sf @GNUCHMOD@ $(DESTDIR)$(instdir)/bin/chmod
>
> dist: dirty-check
> @rm -rf "$(project)"
> diff --git a/configure.ac b/configure.ac
> index 7a34e7a..e155403 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -133,6 +133,15 @@ case "$SED_VERSION" in
> esac
> AC_MSG_RESULT([$SED_VERSION])
>
> +dnl check for chmod GNU version
> +AC_CACHE_CHECK([for chmod from GNU coreutils], [ac_cv_path_GNUCHMOD],
> + [AC_PATH_PROGS_FEATURE_CHECK([GNUCHMOD], [chmod gchmod],
> + [[gnuchmodout=`$ac_path_GNUCHMOD --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
> + test "x$gnuchmodout" = xGNU \
> + && ac_cv_path_GNUCHMOD=$ac_path_GNUCHMOD ac_path_GNUCHMOD_found=:]],
> + [AC_MSG_ERROR([could not find chmod from GNU coreutils])])])
> +AC_SUBST([GNUCHMOD], [$ac_cv_path_GNUCHMOD])
I like the patches in general, but I'm not certain about restricting it to
GNU coreutils. Are we using GNU extensions for all these tools? If yes I'd
like so see a macro for this so we can just add:
PTX_PATH_GNU_COREUTIL(chmod)
or whatever the correct name for such a macro would be.
Michael
> +
> dnl Check for egrep
> AC_PROG_EGREP
>
> --
> 1.7.7
>
>
> --
> 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 0/2] add install-environment
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
` (4 preceding siblings ...)
2011-10-21 19:53 ` [ptxdist] [PATCH 5/5] configrue.ac: add check for md5sum " Andreas Bießmann
@ 2011-11-25 0:40 ` Andreas Bießmann
2011-11-25 0:40 ` [ptxdist] [PATCH v2 1/2] " Andreas Bießmann
` (6 more replies)
5 siblings, 7 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-11-25 0:40 UTC (permalink / raw)
To: ptxdist; +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.
Andreas Bießmann (2):
add install-environment
configure.ac: add check for GNU coreutils
Makefile.in | 14 +++++++++++---
bin/ptxdist | 3 +++
configure.ac | 14 ++++++++++++++
3 files changed, 28 insertions(+), 3 deletions(-)
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 25+ messages in thread
* [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
* [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 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
* 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
* Re: [ptxdist] [PATCH v2 1/2] add install-environment
2011-12-01 18:22 ` Michael Olbrich
@ 2011-12-01 22:11 ` Andreas Bießmann
0 siblings, 0 replies; 25+ messages in thread
From: Andreas Bießmann @ 2011-12-01 22:11 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 1130 bytes --]
Dear Michael,
Am 01.12.2011 um 19:22 schrieb Michael Olbrich:
> On Fri, Nov 25, 2011 at 01:40:19AM +0100, Andreas Bießmann wrote:
<snip>
>> +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.
But I imply to install the links to $(DESTDIR)$(instdir) which is in fact installation phase and should be separated from build phase (as it is now). So do you mean we should prepare the environment in $(PWD)/bin and then in a second step install it through tar?
> And please add python and awk as well.
Will do.
best regards
Andreas Bießmann
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1321 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
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 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
* [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
* 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 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
* [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
* 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
end of thread, other threads:[~2011-12-02 15:27 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21 19:53 [ptxdist] [PATCH 0/5] add install-environment Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 1/5] " Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 2/5] configure.ac: add check for chmod from GNU coreutils Andreas Bießmann
2011-10-27 15:10 ` Michael Olbrich
2011-10-21 19:53 ` [ptxdist] [PATCH 3/5] configure.ac: add check for mv " Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 4/5] configrue.ac: add check for rm " Andreas Bießmann
2011-10-21 19:53 ` [ptxdist] [PATCH 5/5] configrue.ac: add check for md5sum " Andreas Bießmann
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-12-01 18:22 ` Michael Olbrich
2011-12-01 22:11 ` 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 18:24 ` Michael Olbrich
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 15:27 ` Michael Olbrich
2011-12-02 7:51 ` [ptxdist] [PATCH v4 1/4] add environment make target Andreas Bießmann
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 ` [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
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
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 ` [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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox