diff options
Diffstat (limited to '')
-rw-r--r-- | scripts/Makefile | 18 | ||||
-rw-r--r-- | scripts/multipart/Makefile | 18 | ||||
-rw-r--r-- | scripts/w3mman/Makefile | 24 |
3 files changed, 45 insertions, 15 deletions
diff --git a/scripts/Makefile b/scripts/Makefile index 1f055ea..4be82c5 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -7,8 +7,10 @@ HELP_DIR = $(prefix)/lib/w3m LIB_TARGETS = dirlist.cgi w3mhelp.cgi +MKDIR = mkdir -p INSTALL = install -c INSTALL_SCRIPT = $(INSTALL) -m 755 +INSTALL_DATA = $(INSTALL) -m 644 PERL = /usr/local/bin/perl @@ -58,14 +60,26 @@ helplibs: @echo done install: $(LIB_TARGETS) + -$(MKDIR) $(DESTDIR)$(LIB_DIR) + -$(MKDIR) $(DESTDIR)$(HELP_DIR) for file in $(LIB_TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \ done for file in w3mhelp-*.pl; \ do \ - $(INSTALL) $$file $(DESTDIR)$(HELP_DIR); \ + $(INSTALL_DATA) $$file $(DESTDIR)$(HELP_DIR); \ + done + +uninstall: + -for file in $(LIB_TARGETS); \ + do \ + rm -f $(LIB_DIR)/$$file; \ + done + -for file in w3mhelp-*.pl; \ + do \ + rm -f $(HELP_DIR)/$$file; \ done clean: - rm -f $(LIB_TARGETS) w3mhelp-*.pl + -rm -f $(LIB_TARGETS) w3mhelp-*.pl diff --git a/scripts/multipart/Makefile b/scripts/multipart/Makefile index 8825043..5ee3fb6 100644 --- a/scripts/multipart/Makefile +++ b/scripts/multipart/Makefile @@ -7,6 +7,7 @@ distdir = ./distfiles LIB_TARGETS = multipart.cgi +MKDIR = mkdir -p INSTALL = install -c INSTALL_SCRIPT = $(INSTALL) -m 755 @@ -24,21 +25,26 @@ all: $(LIB_TARGETS) chmod +x $@ install: $(LIB_TARGETS) + -$(MKDIR) $(DESTDIR)$(LIB_DIR) for file in $(LIB_TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \ done +uninstall: + -for file in $(LIB_TARGETS); \ + do \ + rm -f $(LIB_DIR)/$$file; \ + done + clean: - rm -f $(LIB_TARGETS) + -rm -f $(LIB_TARGETS) dist: all @-rm -fr $(distdir)/multipart - mkdir -p $(distdir)/multipart - cp Makefile README multipart.cgi multipart.cgi.in \ - $(distdir)/multipart - ( cd $(distdir); \ - tar -cf - multipart | GZIP='' gzip ) \ + $(MKDIR) $(distdir)/multipart + cp Makefile README multipart.cgi.in $(distdir)/multipart + ( cd $(distdir); tar -cf - multipart | GZIP='' gzip ) \ > $(distdir)/multipart.tar.gz -rm -fr $(distdir)/multipart diff --git a/scripts/w3mman/Makefile b/scripts/w3mman/Makefile index 613d561..7a629a8 100644 --- a/scripts/w3mman/Makefile +++ b/scripts/w3mman/Makefile @@ -8,6 +8,7 @@ distdir = ./distfiles TARGETS = w3mman LIB_TARGETS = w3mman2html.cgi +MKDIR = mkdir -p INSTALL = install -c INSTALL_SCRIPT = $(INSTALL) -m 755 @@ -28,6 +29,8 @@ all: $(TARGETS) $(LIB_TARGETS) chmod +x $@ install: $(TARGETS) $(LIB_TARGETS) + -$(MKDIR) $(DESTDIR)$(BIN_DIR) + -$(MKDIR) $(DESTDIR)$(LIB_DIR) for file in $(TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \ @@ -37,17 +40,24 @@ install: $(TARGETS) $(LIB_TARGETS) $(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \ done +uninstall: + -for file in $(TARGETS); \ + do \ + rm -f $(BIN_DIR)/$$file; \ + done + -for file in $(LIB_TARGETS); \ + do \ + rm -f $(LIB_DIR)/$$file; \ + done + clean: - rm -f $(TARGETS) $(LIB_TARGETS) + -rm -f $(TARGETS) $(LIB_TARGETS) dist: all @-rm -fr $(distdir)/w3mman - mkdir -p $(distdir)/w3mman - cp Makefile README w3mman w3mman.in \ - w3mman2html.cgi w3mman2html.cgi.in hlink.cgi \ - $(distdir)/w3mman - ( cd $(distdir); \ - tar -cf - w3mman | GZIP='' gzip ) \ + -$(MKDIR) $(distdir)/w3mman + cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi $(distdir)/w3mman + ( cd $(distdir); tar -cf - w3mman | GZIP='' gzip ) \ > $(distdir)/w3mman.tar.gz -rm -fr $(distdir)/w3mman |