Skip to content

Commit e61f9b8

Browse files
committed
Run aclocal and autoheader if necessary
Run aclocal (or autoheader) if there are any AX_ (or AH_) macros used, but not if there are explicit m4_include lines to provide the macros. Also rewrite @HTSLIB@ on the new config.mk recipe line. Also take htslib/samtools/bcftools from alongside rather than ../rel.
1 parent b06cabb commit e61f9b8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ tar: htslib-$(HTSTAG)$(TAR) bcftools-$(TAG)$(TAR) samtools-$(TAG)$(TAR)
88
./addhtslib $@ $^ $(HTSTAG)
99

1010
htslib-$(HTSTAG)$(TAR):
11-
./mktarball ../rel/htslib $(HTSTAG)
11+
./mktarball ../htslib $(HTSTAG)
1212

1313
%-$(TAG)-solo$(TAR):
14-
./mktarball ../rel/$* $(TAG) -solo
14+
./mktarball ../$* $(TAG) -solo
1515

1616
.PRECIOUS: %-$(TAG)-solo$(TAR)
1717

addhtslib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ innertag=$4
99
rm -rf $outerprojver
1010
tar xf $outer
1111
(cd $outerprojver && tar xf ../$inner &&
12-
sed -e "/^HTSDIR/s/=.*/= htslib-$innertag/" -i.bak Makefile; rm Makefile.bak)
12+
sed -e "/^HTSDIR/s/=.*/= htslib-$innertag/;s,@HTSDIR@#[^#]*#,@HTSDIR@#htslib-$innertag#,g" -i '' Makefile)
1313
rm -f $dest
1414
tar cjf $dest $outerprojver
1515
rm -r $outerprojver

mktarball

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ rm -rf $projver
1515
done
1616
if test -f $projver/configure.ac
1717
then
18-
(cd $projver && MAKEFLAGS= MAKELEVEL= MAKEOVERRIDES= autoconf --warnings=all)
19-
rm -rf $projver/autom4te.cache
18+
(cd $projver
19+
touch config.mk
20+
grep -q AX_ configure.ac && (grep -q m4_include configure.ac || aclocal)
21+
grep -q AH_ configure.ac && autoheader
22+
MAKEFLAGS= MAKELEVEL= MAKEOVERRIDES= autoconf --warnings=all
23+
egrep '^[^#]*[[:<:]]A[A-Z]_[A-Z_]*' configure && exit 1
24+
rm -rf autom4te.cache config.mk)
2025
fi
2126
rm -f $projver$tarsuffix.tar.bz2
2227
tar cjf $projver$tarsuffix.tar.bz2 $projver

0 commit comments

Comments
 (0)