mirror of git://git.suckless.org/sbase
build: Fix sbase-box-install target
The target tried to execute a non valid shell script and there was a possibility to fatorize the creation of the proto file instead of repeating it in all the actions that required.
This commit is contained in:
parent
13898fa7a9
commit
ac6d382515
13
Makefile
13
Makefile
|
@ -220,18 +220,19 @@ getconf.o: getconf.h
|
||||||
getconf.h:
|
getconf.h:
|
||||||
scripts/getconf.sh > $@
|
scripts/getconf.sh > $@
|
||||||
|
|
||||||
install uninstall:
|
proto: $(BIN)
|
||||||
scripts/mkproto $(DESTDIR)$(PREFIX) $(DESTDIR)$(MANPREFIX) proto
|
scripts/mkproto $(DESTDIR)$(PREFIX) $(DESTDIR)$(MANPREFIX) proto
|
||||||
|
|
||||||
|
install uninstall: proto
|
||||||
scripts/$@ proto
|
scripts/$@ proto
|
||||||
|
|
||||||
sbase-box-install: sbase-box
|
sbase-box-install: sbase-box proto
|
||||||
scripts/mkproto $(DESTDIR)$(PREFIX) $(DESTDIR)$(MANPREFIX) proto
|
scripts/install proto
|
||||||
scripts/$@ proto
|
|
||||||
$(DESTDIR)$(PREFIX)/bin/sbase-box -i $(DESTDIR)$(PREFIX)/bin/
|
$(DESTDIR)$(PREFIX)/bin/sbase-box -i $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
sbase-box-uninstall: sbase-box
|
sbase-box-uninstall: sbase-box proto
|
||||||
$(DESTDIR)$(PREFIX)/bin/sbase-box -d $(DESTDIR)$(PREFIX)/bin/
|
$(DESTDIR)$(PREFIX)/bin/sbase-box -d $(DESTDIR)$(PREFIX)/bin/
|
||||||
$(MAKE) uninstall
|
scripts/uninstall proto
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p sbase-$(VERSION)
|
mkdir -p sbase-$(VERSION)
|
||||||
|
|
|
@ -61,6 +61,7 @@ install(char *path)
|
||||||
bp->name);
|
bp->name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
remove(fname);
|
||||||
if (symlink("sbase-box", fname) < 0) {
|
if (symlink("sbase-box", fname) < 0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"sbase-box: %s: %s\n",
|
"sbase-box: %s: %s\n",
|
||||||
|
|
Loading…
Reference in New Issue