]> granicus.if.org Git - sysstat/commitdiff
Escape parentheses in Makefile
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 8 Mar 2015 14:28:20 +0000 (15:28 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 8 Mar 2015 14:28:20 +0000 (15:28 +0100)
"make install" crashes when --enable-install-cron has been used at
configuration stage:

if [ ( -z "/usr/lib/systemd/system" -o ! -d /usr/lib/systemd/system ) -a
! -d /etc/cron.d ]; then \
        if [ ! -d /etc/cron.hourly -o ! -d /etc/cron.daily ]; then \
                su root -c "crontab -l > /tmp/crontab-root.save"; \
                /bin/cp -a /tmp/crontab-root.save ./crontab-root.`date
'+%Y%m%d.%H%M%S'`.save; \
                echo "USER'S PREVIOUS CRONTAB SAVED IN CURRENT DIRECTORY
(USING .save SUFFIX)."; \
                su root -c "crontab cron/crontab"; \
        fi \
fi
/bin/sh: -c: line 0: syntax error near unexpected token `-z'
/bin/sh: -c: line 0: `if [ ( -z "/usr/lib/systemd/system" -o ! -d
/usr/lib/systemd/system ) -a ! -d /etc/cron.d ]; then \'
make: *** [install_all] Error 1

This is because parentheses need to be escaped in Makefile.in.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
Makefile.in

index 8673c9bfed854e9afbbd17de8462bbc0496596ee..8b0c32b2aee1704449f687c646920a7d3f97eec4 100644 (file)
@@ -394,7 +394,7 @@ endif
                fi \
        fi
 ifeq ($(COPY_ONLY),n)
-       if [ ( -z "$(SYSTEMD_UNIT_DIR)" -o ! -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ) -a ! -d $(DESTDIR)/etc/cron.d ]; then \
+       if [ \( -z "$(SYSTEMD_UNIT_DIR)" -o ! -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) \) -a ! -d $(DESTDIR)/etc/cron.d ]; then \
                if [ ! -d $(DESTDIR)/etc/cron.hourly -o ! -d $(DESTDIR)/etc/cron.daily ]; then \
                        su $(CRON_OWNER) -c "crontab -l > /tmp/crontab-$(CRON_OWNER).save"; \
                        $(CP) -a /tmp/crontab-$(CRON_OWNER).save ./crontab-$(CRON_OWNER).`date '+%Y%m%d.%H%M%S'`.save; \