]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
Various Makefile improvements
authorjackal <redacted>
Wed, 15 Nov 2017 17:25:49 +0000 (19:25 +0200)
committerAaron Jones <redacted>
Wed, 15 Nov 2017 21:07:04 +0000 (21:07 +0000)
Makefile.am
doc/Makefile.am
help/Makefile.am
ircd/Makefile.am
librb/Makefile.am
librb/src/Makefile.am

index e41e282d751e5fd4e545083dba0d64413ae0db2e..0260228839f1bb7d8e99c82865872fa5d5bf47ae 100644 (file)
@@ -8,18 +8,18 @@ SUBDIRS += libltdl
 endif
 
 SUBDIRS += ircd \
-           ssld \
-           wsockd \
-           authd \
-           bandb \
-           tests \
-           tools \
-           modules \
-           extensions \
-           help \
-           doc
-
-logdir = @prefix@/logs
+       ssld \
+       wsockd \
+       authd \
+       bandb \
+       tests \
+       tools \
+       modules \
+       extensions \
+       help \
+       doc
+
+logdir = ${prefix}/logs
 
 BUILT_SOURCES = include/serno.h
 
@@ -38,23 +38,27 @@ include/serno.h:
        fi
 
 install-data-hook:
-       test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}
+       @test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}
 
 install-exec-hook:
-       rm -f ${DESTDIR}${moduledir}/*.la
-       rm -f ${DESTDIR}${moduledir}/autoload/*.la
-       rm -f ${DESTDIR}${moduledir}/extensions/*.la
-       rm -f ${DESTDIR}${moduledir}/*.dll.a
-       rm -f ${DESTDIR}${moduledir}/autoload/*.dll.a
-       rm -f ${DESTDIR}${moduledir}/extensions/*.dll.a
+       @rm -f ${DESTDIR}${moduledir}/*.la
+       @rm -f ${DESTDIR}${moduledir}/autoload/*.la
+       @rm -f ${DESTDIR}${moduledir}/extensions/*.la
+       @rm -f ${DESTDIR}${moduledir}/*.dll.a
+       @rm -f ${DESTDIR}${moduledir}/autoload/*.dll.a
+       @rm -f ${DESTDIR}${moduledir}/extensions/*.dll.a
 
 distclean-local:
-       rm -f librb/include/librb-config.h
+       @rm -f librb/include/librb-config.h
 
 clean-local:
-       rm -f include/serno.h
-       rm -f ircd/ircd_lexer.c
-       rm -f ircd/ircd_parser.c
-       rm -f ircd/ircd_parser.h
-       rm -f ircd/version.c
-       rm -f ircd/version.c.last
+       @rm -f include/serno.h
+       @rm -f ircd/ircd_lexer.c
+       @rm -f ircd/ircd_parser.c
+       @rm -f ircd/ircd_parser.h
+       @rm -f ircd/version.c
+       @rm -f ircd/version.c.last
+
+uninstall:
+       @echo "Removing ${prefix}"
+       @rm -rf ${prefix}
index b49667f3911d14903921b5cec89613a6afa6f1c4..3d5b959ea68b62cbe46c179dca1bd72a31a53421 100644 (file)
@@ -3,7 +3,7 @@ exec_prefix     = @exec_prefix@
 exec_suffix    = @exec_suffix@
 bindir         = @bindir@
 libexecdir     = @libexecdir@
-sysconfdir             = @sysconfdir@
+sysconfdir     = @sysconfdir@
 localstatedir  = @localstatedir@
 
 # Local to the etc Makefile
@@ -12,25 +12,21 @@ CONFS               = ircd.conf.example reference.conf
 
 install-mkdirs:
        -@if test ! -d $(DESTDIR)$(sysconfdir); then \
-               echo "mkdir -p $(sysconfdir)"; \
                mkdir -p $(DESTDIR)$(sysconfdir); \
        fi
 
 install: install-mkdirs
-       @echo "ircd: installing example config files ($(CONFS))"
+       @echo "Installing example config files ($(CONFS))"
        @for i in $(CONFS); do \
                if test -f $(DESTDIR)$(sysconfdir)/$$i; then \
                        $(MV) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.old; \
                fi; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
        done
-
        -@if test ! -f $(DESTDIR)$(sysconfdir)/ircd.motd; then \
-               echo "ircd: installing motd file (ircd.motd)"; \
+               echo "Installing motd file (ircd.motd)"; \
                $(INSTALL_DATA) ircd.motd $(DESTDIR)$(sysconfdir); \
        fi
-
        -@if test -f $(DESTDIR)$(sysconfdir)/links.txt; then \
                $(RM) $(DESTDIR)$(sysconfdir)/links.txt; \
        fi
-
index cc9e8a25fc487ceeae1c8ee927788138ada408fa..98b029e6915f3d28ed60d369dbe7749fc01fc88d 100644 (file)
@@ -15,14 +15,8 @@ SYMLINKS=    topic accept cmode admin names links away whowas \
                user help pass error challenge knock ping pong \
                map trace chantrace extban monitor
 
-all: index
-build:
-clean:
-depend:
-lint:
-
-index:
-       @echo building index files
+all:
+       @echo "Building index files"
        @rm -f users/index.tmp
        @for help in users/*; do \
                if [ -f $$help ]; then \
@@ -32,8 +26,8 @@ index:
        @for help in $(SYMLINKS); do \
                echo $$help >> users/index.tmp; \
        done
-       @echo 'Help topics available to users:' > users/index
-       @echo '' >> users/index
+       @echo "Help topics available to users:" > users/index
+       @echo "" >> users/index
        @cat users/index.tmp \
                | sed -e 's|^users/||' \
                | sort -u \
@@ -48,8 +42,8 @@ index:
                        echo $$help >> opers/index.tmp; \
                fi \
        done
-       @echo 'Help topics available to opers:' > opers/index
-       @echo '' >> opers/index
+       @echo "Help topics available to opers:" > opers/index
+       @echo "" >> opers/index
        @cat opers/index.tmp \
                | sed -e 's|^opers/||' \
                | sort -u \
@@ -64,24 +58,22 @@ install:
                rm -rf $(DESTDIR)$(helpdir)-old; \
        fi
        -@if test -d $(DESTDIR)$(helpdir); then \
-               echo "ircd: backing up old help files"; \
+               echo "Backing up old help files"; \
                mv $(DESTDIR)$(helpdir) $(DESTDIR)$(helpdir)-old; \
        fi
-
-       @echo "ircd: setting up help directory structure"
+       @echo "Setting up help directory structure"
        @mkdir -p -m 755 $(DESTDIR)$(helpdir)
        @mkdir -p -m 755 $(DESTDIR)$(helpdir)/opers
        @mkdir -p -m 755 $(DESTDIR)$(helpdir)/users
-
        @for help in opers/*; do \
-       if [ -f $$help ]; then \
-               ${INSTALL_DATA} $$help $(DESTDIR)$(ohelpdir); \
-       fi \
+               if [ -f $$help ]; then \
+                       ${INSTALL_DATA} $$help $(DESTDIR)$(ohelpdir); \
+               fi \
        done
        @for help in users/*; do \
-       if [ -f $$help ]; then \
-               $(INSTALL_DATA) $$help $(DESTDIR)$(uhelpdir); \
-       fi \
+               if [ -f $$help ]; then \
+                       $(INSTALL_DATA) $$help $(DESTDIR)$(uhelpdir); \
+               fi \
        done
        @for link in $(SYMLINKS); do \
                rm -f $(DESTDIR)$(uhelpdir)/$$link; \
index d4b1e31b7f24c6980b428f2c283cc88d0160c4b4..bc0396ece0609691f26d7dd662ce9c288bd7c2bd 100644 (file)
@@ -10,9 +10,9 @@ AM_YFLAGS = -d
 BUILT_SOURCES = ircd_parser.h version.c
 
 version.c: version.c.SH ../CREDITS ../include/patchlevel.h ../include/serno.h
-       $(SHELL) version.c.SH
-       $(CP) version.c version.c.last
-       touch version.c.SH
+       @$(SHELL) version.c.SH
+       @$(CP) version.c version.c.last
+       @touch version.c.SH
 
 if MINGW
 EXTRA_FLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
@@ -75,4 +75,4 @@ charybdis_LDFLAGS = $(EXTRA_FLAGS) -dlopen self
 charybdis_LDADD = libircd.la -L$(top_srcdir)/librb/src -lrb
 
 install-exec-hook: install-libircdLTLIBRARIES
-       $(RM) -f version.c
+       @$(RM) -f version.c
index 6b9a006ca9474c1ceb80f3cfea2bb449e72b4ce7..e2eca5a69bf4f026433c976c34e0d55af7e78181 100644 (file)
@@ -17,6 +17,6 @@ include/serno.h:
        fi
 
 clean-local:
-       rm -f include/serno.h
-       rm -f src/version.c
-       rm -f src/version.c.last
+       @rm -f include/serno.h
+       @rm -f src/version.c
+       @rm -f src/version.c.last
index cd13ff69e2430e9b4c702d89122bcffe931e7fe3..d1780e125f6b62658fdd948414f50a6ae810dac5 100644 (file)
@@ -6,11 +6,11 @@ AM_CPPFLAGS = -I. -I../include @SSL_CFLAGS@ @GNUTLS_CFLAGS@ @MBEDTLS_CFLAGS@
 BUILT_SOURCES = version.c
 
 version.c: version.c.SH ../CREDITS
-       $(SHELL) ./version.c.SH
-       $(CP) version.c version.c.last
+       @$(SHELL) ./version.c.SH
+       @$(CP) version.c version.c.last
 
 version.lo: version.c ../include/serno.h
-       $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
+       @$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
 
 librb_la_SOURCES =                     \
        unix.c                          \