чување 55fec36addf565884ebe2e4d02edd21781e71b16
родитељ 95cfcb158df786335f21d9ac5f2089ceb3f68489
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Sun, 7 Apr 2024 00:15:22 +0200
Merge examples/Makefile into Makefile
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 2, додавања: 6(+), брисања: 22(-)
diff --git a/Makefile b/Makefile
@@ -40,12 +40,10 @@ $(PROG): $(OBJS) $(SRC) $(HEADERS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
- cd examples && make -e clean && cd -
rm -f tests/testfile version date version.h *.o *.xz *~ \
$(PROG) $(MANPAGE)
install: all
- cd examples && make -e install && cd -
umask 022
$(INSTALL) -Dm 0644 $(MANPAGE) $(MANPREFIX)/man1/$(MANPAGE)
ln -sf $(MANPAGE) $(MANPREFIX)/man1/tablep.1
@@ -55,14 +53,19 @@ install: all
$(INSTALL) -Dm 0755 $(PROG) $(BINDIR)/$(PROG)
ln -sf table $(BINDIR)/tablep
ln -sf table $(BINDIR)/tsvtable
+ find examples -type f -exec sh -c 'umask 022; \
+ basename {} | xargs printf "$(EXDIR)/%s\n" | \
+ xargs $(INSTALL) -Dm 0644 {}' shell \;
uninstall:
- cd examples && make -e uninstall && cd -
rm -f $(MANPREFIX)/man1/$(MANPAGE)
rm -f $(MANPREFIX)/man1/tablep.1
rm -f $(MANPREFIX)/man1/tsvtable.1
rmdir $(MANPREFIX)/man1 2>/dev/null || true
rmdir $(MANPREFIX) 2>/dev/null || true
+ find $(EXDIR) -type f -exec rm {} \; || true
+ find $(EXDIR) -depth -type d -exec rmdir {} \; || true
+ rmdir $(EXDIR) 2>/dev/null || true
rm -f $(DOCDIR)/README
rm -f $(DOCDIR)/LICENSE
rmdir $(DOCDIR) 2>/dev/null || true
diff --git a/examples/Makefile b/examples/Makefile
@@ -1,19 +0,0 @@
-.POSIX:
-
-include ../config.mk
-
-all:
- :
-
-clean:
- :
-
-install:
- find . -type f -exec sh -c 'umask 022; \
- $(INSTALL) -Dm 0644 {} $(EXDIR)/{}' shell \;
-
-uninstall:
- find $(EXDIR) -type f -exec rm {} \; || true
- find $(EXDIR) -depth -type d -exec rmdir {} \; || true
-
-.PHONY: all clean install uninstall