[pacman-dev] [PATCH] autotools cleanup

Jürgen Hötzel juergen at hoetzel.info
Fri Jan 26 20:58:51 EST 2007


Hi,

* Fix building outside $(srcdir).
* Removed ./gen-mirrorlist.sh invocation from configure script:
  Mirror-files are generated by make, not configure. 

Jürgen
-------------- next part --------------
Index: autoclean.sh
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/autoclean.sh,v
retrieving revision 1.8
diff -u -p -r1.8 autoclean.sh
--- autoclean.sh	26 Jan 2007 02:13:16 -0000	1.8
+++ autoclean.sh	27 Jan 2007 01:48:55 -0000
@@ -36,7 +36,6 @@ rm -rf etc/Makefile.in
 rm -rf etc/Makefile
 rm -rf etc/pacman.d/Makefile.in
 rm -rf etc/pacman.d/Makefile
-rm -rf etc/pacman.d/{current,extra,community,unstable,release}
 rm -rf etc/abs/Makefile.in
 rm -rf etc/abs/Makefile
 
Index: configure.ac
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/configure.ac,v
retrieving revision 1.23
diff -u -p -r1.23 configure.ac
--- configure.ac	26 Jan 2007 02:13:16 -0000	1.23
+++ configure.ac	27 Jan 2007 01:48:55 -0000
@@ -364,10 +364,6 @@ bindings/perl/Makefile
 bindings/python/Makefile
 bindings/java/Makefile
 Makefile
-],
-[
- cd etc/pacman.d/
- ./gen-mirrorlist.sh
 ])
 
 echo "
Index: doc/Makefile.am
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/doc/Makefile.am,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile.am
--- doc/Makefile.am	16 Oct 2006 00:02:43 -0000	1.9
+++ doc/Makefile.am	27 Jan 2007 01:48:56 -0000
@@ -5,9 +5,10 @@ SUBDIRS = hu
 po4a:
 if HAS_PO4A
 	@$(NORMAL_INSTALL)
-	po4a -k 0 po4a.cfg
+	po4a -k 0 --variable srcdir=$(srcdir) $(srcdir)/po4a.cfg 
 endif
 
+# DIST_SUBDIRS 
 if HAS_MAN2HTML
 makepkg.8:
 	man2html makepkg.8 > html/makepkg.8.html
@@ -27,7 +28,7 @@ clean:
 man_MANS = pacman.8 makepkg.8 PKGBUILD.8 libalpm.3
 
 if HAS_DOXYGEN
-man_MANS += man3/*.3
+man_MANS += *.3
 endif
 
-EXTRA_DIST = $(man_MANS)
+EXTRA_DIST = $(man_MANS) po4a.cfg
Index: doc/po4a.cfg
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/doc/po4a.cfg,v
retrieving revision 1.1
diff -u -p -r1.1 po4a.cfg
--- doc/po4a.cfg	15 Oct 2006 18:58:24 -0000	1.1
+++ doc/po4a.cfg	27 Jan 2007 01:48:56 -0000
@@ -1,11 +1,11 @@
 [po4a_langs] hu
 [po4a_paths] po/pacman.pot $lang:po/$lang.po
-[type: man] pacman.8 \
-	$lang:$lang/pacman.8 add_$lang:addendum.8.$lang \
+[type: man] $(srcdir)/pacman.8 \
+	$lang:$lang/pacman.8 add_$(srcdir)/$lang:addendum.8.$lang \
 	opt:"-o groff_code=verbatim -o translate_joined=CW,CE -o no_wrap=CW:CE"
-[type: man] makepkg.8 \
-	$lang:$lang/makepkg.8 add_$lang:addendum.8.$lang \
+[type: man] $(srcdir)/makepkg.8 \
+	$lang:$lang/makepkg.8 add_$(srcdir)/$lang:addendum.8.$lang \
 	opt:"-o groff_code=verbatim -o translate_joined=CW,CE -o no_wrap=CW:CE"
-[type: man] PKGBUILD.8 \
-	$lang:$lang/PKGBUILD.8 add_$lang:addendum.8.$lang \
+[type: man] $(srcdir)/PKGBUILD.8 \
+	$lang:$lang/PKGBUILD.8 add_$(srcdir)/$lang:addendum.8.$lang \
 	opt:"-o groff_code=verbatim -o translate_joined=CW,CE -o no_wrap=CW:CE"
Index: etc/pacman.d/Makefile.am
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/etc/pacman.d/Makefile.am,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile.am
--- etc/pacman.d/Makefile.am	26 Jan 2007 02:13:16 -0000	1.4
+++ etc/pacman.d/Makefile.am	27 Jan 2007 01:48:56 -0000
@@ -1,14 +1,9 @@
-EXTRA_DIST = community current extra release unstable
+pkgsysconfdir = ${sysconfdir}/pacman.d
+dist_pkgsysconf_DATA = community current extra release unstable
 
-clean:
+$(dist_pkgsysconf_DATA): mirrorlist
+	sed "s|@@REPO@@|$@|g" <$< >$@
 
-install-data-hook:
-	mkdir -p $(DESTDIR)$(sysconfdir)/pacman.d ; \
-	for j in $(EXTRA_DIST); do \
-	    $(INSTALL) -c -m 644 $(srcdir)/$$j $(DESTDIR)$(sysconfdir)/pacman.d/$$j ; \
-	done
+clean:
+	rm $(dist_pkgsysconf_DATA)
 
-uninstall-hook:
-	for j in $(EXTRA_DIST); do \
-	    rm -f $(DESTDIR)$(sysconfdir)/pacman.d/$$j ; \
-	done
Index: lib/libalpm/Makefile.am
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/lib/libalpm/Makefile.am,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile.am
--- lib/libalpm/Makefile.am	26 Jan 2007 02:13:16 -0000	1.14
+++ lib/libalpm/Makefile.am	27 Jan 2007 01:48:56 -0000
@@ -46,6 +46,6 @@ if HAS_DOXYGEN
 all: doxygen.in
 
 doxygen.in:
-	doxygen Doxyfile
+	doxygen $(srcdir)/Doxyfile
 
 endif
Index: src/pacman/Makefile.am
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/src/pacman/Makefile.am,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.am
--- src/pacman/Makefile.am	26 Jan 2007 02:13:16 -0000	1.12
+++ src/pacman/Makefile.am	27 Jan 2007 01:48:56 -0000
@@ -16,10 +16,10 @@ pacman_SOURCES = util.c log.c package.c 
 
 pacman_static_SOURCES = $(pacman_SOURCES)
 
-pacman_LDADD = -L$(top_srcdir)/lib/libalpm/.libs \
+pacman_LDADD = -L$(top_builddir)/lib/libalpm/.libs \
 			   -ldownload -lalpm
 
-pacman_static_LDADD = -L$(top_srcdir)/lib/libalpm/.libs/ \
+pacman_static_LDADD = -L$(top_builddir)/lib/libalpm/.libs/ \
 					  -ldownload -lalpm
 
 pacman_static_LDFLAGS = $(LDFLAGS) -all-static
Index: src/util/Makefile.am
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/src/util/Makefile.am,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile.am
--- src/util/Makefile.am	23 Nov 2006 02:36:26 -0000	1.6
+++ src/util/Makefile.am	27 Jan 2007 01:48:56 -0000
@@ -4,4 +4,4 @@ AM_CFLAGS = -I$(top_srcdir)/lib/libalpm
 
 vercmp_SOURCES = vercmp.c
 
-vercmp_LDADD = $(top_srcdir)/lib/libalpm/libalpm.la
+vercmp_LDADD = $(top_builddir)/lib/libalpm/libalpm.la
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070127/e6b0b145/attachment.pgp>


More information about the pacman-dev mailing list