Skip to content

Commit 0e0d2b6

Browse files
committed
Have autogen.sh copy in some files
Debian policy calls for these files not to be duplicated. However, we need to do it in a portable way (e.g., works on RPM-based systems so /usr/share/misc/config.guess is not OK; does not touch network, so doing curl/wget of the canonical config.guess file is not OK) While there should be an obvious way to copy these files, there's .. not. This is the best I could come up with, using files from automake without actually invoking it. While I did not actually BUILD on an rpm-based system, I checked the content of the automake rpm of fedora 36 and it looks like it should work. I'd rather avoid the new build-time dependency on automake, but "automake --print-libdir" was the only 'portable' way I found to print the location of a directory containing config.guess, config.sub and install-sh. Alternative to #1625
1 parent e398a8b commit 0e0d2b6

File tree

6 files changed

+20
-3824
lines changed

6 files changed

+20
-3824
lines changed

debian/control.top.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Build-Depends:
1111
@MODUTILS_DEPENDS@,
1212
@EXTRA_BUILD@,
1313
autoconf,
14+
automake,
1415
bwidget (>= 1.7),
1516
desktop-file-utils,
1617
gettext,

src/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
/.tmp_versions
44
/Makefile.inc
55
/Makefile.modinc
6+
/config.guess
67
/config.h
78
/config.log
89
/config.status
10+
/config.sub
11+
/install-sh
912
/objects
1013
/depends
1114
/autom4te.cache

src/autogen.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@ rm -rf autom4te.cache
33
AUTOGEN_TARGET=${AUTOGEN_TARGET-configure:config.h.in}
44
set -e
55
case :$AUTOGEN_TARGET: in
6-
*:configure:*) autoconf; touch configure ;;
6+
*:configure:*)
7+
automake_libdir=`automake --print-libdir`
8+
[ -e config.guess ] || cp $automake_libdir/config.guess .
9+
[ -e config.sub ] || cp $automake_libdir/config.sub .
10+
[ -e install-sh ] || cp $automake_libdir/install-sh .
11+
autoconf
12+
# autoconf only updates the timestamp if the output actually changed.
13+
# The target's timestamp must be updated or make is confused
14+
touch configure
15+
;;
716
esac
817
case :$AUTOGEN_TARGET: in
9-
*:config.h.in:*) autoheader; touch config.h.in ;;
18+
*:config.h.in:*)
19+
autoheader
20+
# autoheader only updates the timestamp if the output actually changed.
21+
# The target's timestamp must be updated or make is confused
22+
touch config.h.in
23+
;;
1024
esac

0 commit comments

Comments
 (0)