diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2007-06-17 16:23:03 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2007-06-17 16:23:03 +0000 |
commit | 31d21f9ae093cd7f760464e523ca87f2bd24c6fa (patch) | |
tree | 7e4ef45a15a60657f5a5d1587d4f1da45e6c6ec3 | |
parent | b7098f1ef6f2dfbfaaf4eb3d98b1f09dd0446eb1 (diff) | |
download | rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.gz rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.bz2 rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.xz rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.zip |
- push into platform all compat arch
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | genplatform.in | 20 |
3 files changed, 28 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 27e2844..5535346 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,8 +14,6 @@ pkg_data_in = $(pkg_gdata:=.in) pkg_gconfig = \ platform -pkg_gconfig_in = $(pkg_gconfig:=.in) - pkg_scripts = \ brp-compress \ brp-strip \ @@ -40,7 +38,7 @@ pkg_gscripts = \ pkg_scripts_in = $(pkg_gscripts:=.in) -BUILT_SOURCES = macros-perarch make_macrosfiles.sh +BUILT_SOURCES = macros-perarch make_macrosfiles.sh genplatform pkglibdir = @RPMVENDORDIR@ @@ -66,8 +64,8 @@ EXTRA_DIST = \ $(pkg_data_in) \ $(pkg_scripts) \ $(pkg_scripts_in) \ - $(pkg_gconfig_in) \ macros-perarch.in make_macrosfiles.sh.in \ + genplatform.in \ rpm-spec-mode.el \ tests.sh tests/macros.sh @@ -78,7 +76,8 @@ edit = sed \ -e 's,@RPMLIBDIR\@,$(RPMLIBDIR),g' \ -e 's,@RPMSYSCONFDIR\@,$(RPMSYSCONFDIR),g'\ -e 's,@RPMOS\@,$(RPMOS),g' \ - -e 's,@CANONTARGETCPU\@,$(CANONTARGETCPU),g' + -e 's,@CANONTARGETCPU\@,$(CANONTARGETCPU),g' \ + -e 's,@RPMALLARCH\@,$(RPMALLARCH),g' %: %.in Makefile $(edit) $< > $@ @@ -87,6 +86,9 @@ edit = sed \ arch=`echo $@ | sed 's,\\.macros,,'`; \ sh ./make_macrosfiles.sh macros-perarch $$arch > $@ +platform: genplatform Makefile + perl genplatform $(CANONTARGETCPU) > $@ + install-data-local: $(macrosfiles) $(pkg_gconfig) for i in $(RPMALLARCH); do \ $(mkinstalldirs) $(DESTDIR)$(RPMVENDORDIR)/$${i}-$(RPMOS); \ diff --git a/configure.ac b/configure.ac index dc0d404..47f5700 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_CHECK_HEADERS([string.h rpm/rpmmacros.h rpm/rpmlib.h]) CANONTARGETCPU=${target_cpu} case "${target_cpu}" in - *86|athlon|k6) + *86|athlon|k6|pentium*) RPMALLARCH="i386 i486 i586 i686 k6 athlon pentium3 pentium4" CANONTARGETCPU=i586 ;; @@ -114,5 +114,4 @@ if test $with_rpmsysconfdir; then fi AC_SUBST(RPMSYSCONFDIR) - AC_OUTPUT diff --git a/genplatform.in b/genplatform.in new file mode 100644 index 0000000..0a22495 --- /dev/null +++ b/genplatform.in @@ -0,0 +1,20 @@ +#!/usr/sbin/perl + +# $Id$ +use strict; +use warnings; + +my @ALLARCH=qw{ + @RPMALLARCH@ +}; + +my $suffix = '-@RPMCANONVENDOR@-@RPMOS@-gnu'; +my $canonarch = $ARGV[0] || `uname -m`; +chomp($canonarch); + +my $found = 0; +foreach my $arch (reverse @ALLARCH) { + $arch eq $canonarch and $found = 1; + $found or next; + printf "$arch$suffix\n"; +} |