[w3m-dev 02614] cleanup Makefiles
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user