Reflected support for phony script targets when installing as well
This commit is contained in:
parent
58acf2ed3a
commit
17d5fb9d81
@ -2124,14 +2124,17 @@ static void _install_target_script(Configure * configure, FILE * fp,
|
|||||||
{
|
{
|
||||||
String const * path;
|
String const * path;
|
||||||
String const * script;
|
String const * script;
|
||||||
|
int phony;
|
||||||
|
|
||||||
if((path = config_get(configure->config, target, "install")) == NULL)
|
if((path = config_get(configure->config, target, "install")) == NULL)
|
||||||
return;
|
return;
|
||||||
if((script = config_get(configure->config, target, "script")) == NULL)
|
if((script = config_get(configure->config, target, "script")) == NULL)
|
||||||
return;
|
return;
|
||||||
fprintf(fp, "\t%s%s%s%s%s%s", script, " -P \"$(DESTDIR)",
|
phony = _makefile_is_phony(configure, target);
|
||||||
|
fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -P \"$(DESTDIR)",
|
||||||
(path[0] != '\0') ? path : "$(PREFIX)",
|
(path[0] != '\0') ? path : "$(PREFIX)",
|
||||||
"\" -i -- \"$(OBJDIR)", target, "\"\n");
|
"\" -i -- \"", phony ? "" : "$(OBJDIR)", target,
|
||||||
|
"\"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _install_include(Config * config, FILE * fp, String const * include);
|
static int _install_include(Config * config, FILE * fp, String const * include);
|
||||||
|
@ -26,8 +26,10 @@ distclean: clean
|
|||||||
|
|
||||||
install: $(TARGETS)
|
install: $(TARGETS)
|
||||||
./script.sh -P "$(DESTDIR)/somewhere/else/again" -i -- "$(OBJDIR)test"
|
./script.sh -P "$(DESTDIR)/somewhere/else/again" -i -- "$(OBJDIR)test"
|
||||||
|
./script.sh -P "$(DESTDIR)$(PREFIX)" -i -- "phony"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
./script.sh -P "$(DESTDIR)/somewhere/else/again" -u -- "test"
|
./script.sh -P "$(DESTDIR)/somewhere/else/again" -u -- "test"
|
||||||
|
./script.sh -P "$(DESTDIR)$(PREFIX)" -u -- "phony"
|
||||||
|
|
||||||
.PHONY: all clean distclean install uninstall phony
|
.PHONY: all clean distclean install uninstall phony
|
||||||
|
@ -11,3 +11,4 @@ install=/somewhere/else/again
|
|||||||
type=script
|
type=script
|
||||||
script=./script.sh
|
script=./script.sh
|
||||||
phony=1
|
phony=1
|
||||||
|
install=
|
||||||
|
Loading…
Reference in New Issue
Block a user