Pull r1.43 -> r1.44 from head
[freeradius.git] / Makefile
index f9c523f..7778316 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,20 @@ clean:
        @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
        @rm -f *~
 
+#
+# The $(R) is a magic variable not defined anywhere in this source.
+# It's purpose is to allow an admin to create an installation 'tar'
+# file *without* actually installing it.  e.g.:
+#
+#  $ R=/home/root/tmp make install
+#  $ cd /home/root/tmp
+#  $ tar -cf ~/freeradius-package.tar *
+#
+# The 'tar' file can then be un-tar'd on any similar machine.  It's a
+# cheap way of creating packages, without using a package manager.
+# Many of the platform-specific packaging tools use the $(R) variable
+# when creating their packages.
+#
 install:
        $(INSTALL) -d -m 755    $(R)$(sbindir)
        $(INSTALL) -d -m 755    $(R)$(bindir)
@@ -29,25 +43,26 @@ install:
        $(INSTALL) -d -m 755    $(R)$(RUNDIR)
        $(INSTALL) -d -m 700    $(R)$(logdir)
        $(INSTALL) -d -m 700    $(R)$(radacctdir)
-       $(INSTALL) -d -m 700    $(R)$(datadir)
-       $(INSTALL) -d -m 700    $(R)$(dictdir)
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       $(INSTALL) -d -m 755    $(R)$(datadir)
+       $(INSTALL) -d -m 755    $(R)$(dictdir)
        for i in 1 5 8; do \
                $(INSTALL) -d -m 755    $(R)$(mandir)/man$$i; \
                for p in man/man$$i/*.$$i; do \
                        $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
                done \
        done
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
        @echo "Installing dictionary files in $(R)$(dictdir)"; \
        cd share; \
        for i in dictionary*; do \
                $(INSTALL) -m 644 $$i $(R)$(dictdir); \
-       done; \
+       done
+       $(LIBTOOL) --finish $(R)$(libdir)
 
 common:
        @for dir in $(SUBDIRS); do \
                echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
-               (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
+               (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit $?;\
        done
 
 distclean: clean
@@ -87,3 +102,6 @@ config.status: configure
        ./config.status --recheck
 
 configure.in:
+
+TAGS:
+       etags `find src -type f -name '*.[ch]' -print`