[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
install-links Makefile rule
From: |
Keri Harris |
Subject: |
install-links Makefile rule |
Date: |
Sun, 22 Jul 2018 13:18:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hi,
The install-links rule in the gprolog Makefile contains a couple of bugs:
install-links: uninstall-links
if test $(LINKS_DIR) != none; then \
./mkinstalldirs $(LINKS_DIR); \
(cd $(LINKS_DIR) ; $(LN_S) $(INSTALL_DIR)/bin/* .); \
fi
uninstall-links:
-if test $(LINKS_DIR) != none; then \
(cd $(LINKS_DIR) 2>/dev/null && rm -f $(BIN_FILES)); \
rmdir $(LINKS_DIR) 2>/dev/null; \
fi || exit 0;
1. install-links uses a wildcard character.
This is not expanded by make and instead the single symlink
'/path/to/bin/*' is created. If the wildcard character was expanded then
we run the risk of creating links to all files in $(INSTALL_DIR)/bin,
which would be what we want if $(INSTALL_DIR)/bin points to a populated
directory like /usr/bin.
2. install-links depends on uninstall-links
Running uninstall-links can be very dangerous. For example, if configure
is invoked with the arg --with-links-dir=/usr/bin then the
uninstall-links rule will attempt to delete /usr/bin. I don't think that
the gprolog install should be attempting to delete anything.
I've attached a patch for both of these issues.
Thanks
Keri
gprolog-1.4.4-links.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- install-links Makefile rule,
Keri Harris <=