Summary:ASTERISK-09447: make update and make uninstall
Reporter:Andrew Latham (lathama)Labels:
Date Opened:2007-05-15 08:47:36Date Closed:2007-05-17 12:29:35
Versions:Frequency of
Environment:Attachments:( 0) update_uninstall_makefile.diff
Description:New make targets.  One for SVN update and one for uninstall


add to Makefile somewhere near "install" for readability.

      @if [ -d .svn ]; then \
              echo "Updating from Subversion..." ; \
              svn update | tee update.out; \
              rm -f .version; \
              if [ `grep -c ^C update.out` -gt 0 ]; then \
                      echo ; echo "The following files have conflicts:" ; \
                      grep ^C update.out | cut -b4- ; \
              fi ; \
              rm -f update.out; \
      else \
              echo "Not under version control";  \

      rm -rf $(ASTETCDIR); \
      rm -rf $(CONFIGDIR);
Comments:By: Jason Parker (jparker) 2007-05-15 10:12:54

Removing $(ASTETCDIR) is a very, VERY, *VERY*, bad thing.

Also, there are other directories that get installed by the GUI - they all need to be removed.

By: Andrew Latham (lathama) 2007-05-15 11:36:58

What directories should be removed?

"mkdir -p $(ASTETCDIR)" is in the Makefile so I would assume that it makes this directory for a reason.  Yes I understand that this directory is used for other projects, maybe it should be installed else where or in a directory in $(ASTETCDIR).

Having standard targets like "clean", "install", "uninstall", and "update" will only help the user.

Is the update script OK to commit?

By: Andrew Latham (lathama) 2007-05-15 11:57:22

So would this work better?

   @for x in gui_configs/*; do \
       rm -f $(ASTETCDIR)/$$x; \
   @for x in scripts/*; do \
       rm -f $(ASTVARLIBDIR)/scripts/$$x; \
   rm -rf $(HTTPDIR);

By: Andrew Latham (lathama) 2007-05-17 08:10:26

qwell, could I get some feedback on this, I have a patch for the Zaptel Makefile that I will submit after this one gets approved/commited.

By: Jason Parker (jparker) 2007-05-17 12:29:35

Added to revision 953.