1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/etc/Makefile.am
Dan McGee 781af8f91b Use automake verbose helpers in custom make rules
This converts our script generation to use the built-in AM_V_GEN macro,
which honors the V= setting passed to make and allows one to see the
full command if they truly desire. The AM_V_at macro is also used in
place of an explicit @ so verbose-mode compiles show all commands being
run.

We can also use these two macros in doc generation to quiet it down to
the level we expect.

Other minor changes:
* a pointless test call is removed in test/pacman/tests/
* sed is used instead of dos2unix as we depend on it anyway
* consecutive chmod calls are reduced to a single call (e.g., '+x,a-x')

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08 09:17:39 -06:00

33 lines
1.1 KiB
Makefile

dist_sysconf_DATA = makepkg.conf pacman.conf
EXTRA_DIST = makepkg.conf.in pacman.conf.in
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(dist_sysconf_DATA)
#### Taken from the autoconf scripts Makefile.am ####
edit = sed \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@PKGEXT[@]|$(PKGEXT)|g' \
-e 's|@SRCEXT[@]|$(SRCEXT)|g' \
-e 's|@STRIP_BINARIES[@]|$(STRIP_BINARIES)|g' \
-e 's|@STRIP_SHARED[@]|$(STRIP_SHARED)|g' \
-e 's|@STRIP_STATIC[@]|$(STRIP_STATIC)|g' \
-e 's|@CARCH[@]|$(CARCH)|g' \
-e 's|@CHOST[@]|$(CHOST)|g' \
-e 's|@ARCHSWITCH[@]|$(ARCHSWITCH)|g' \
-e 's|@ROOTDIR[@]|$(ROOTDIR)|g'
$(dist_sysconf_DATA): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
$(AM_V_GEN)$(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
$(AM_V_at)mv $@.tmp $@
makepkg.conf: $(srcdir)/makepkg.conf.in
pacman.conf: $(srcdir)/pacman.conf.in
# vim:set ts=2 sw=2 noet: