root/morphix/trunk/cloop/advancecomp-1.9_create_compressed_fs/noautomake.sh

Revision 2, 1.7 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

  • Property svn:executable set to
Line 
1 #! /bin/sh
2
3 # Let autoconf run when this is set
4 autoconf=:
5
6 usage()
7 {
8         echo "usage: `basename $0` --help | --version"
9         echo "usage: `basename $0` [--[no]autoconf]"
10 }
11
12 help()
13 {
14         echo
15         echo "This program will touch the files necessary to prevent Automake, aclocal,"
16         echo "and, optionally, Autoheader, Autoconf, and configure from running after a"
17         echo "fresh update from the CVS repository."
18         echo
19         echo "    -h | --help        Display this text and exit"
20         echo "    -V | --version     Display version and exit"
21         echo "    -a | --autoconf    Allow Autoconf & Autoheader to run (default)"
22         echo "    -A | --noautoconf  Prevent Autoconf & Autoheader from running"
23         echo
24         echo "Not running Automake & aclocal causes changes to the following user files"
25         echo "to be ignored:"
26         echo
27         echo "    Makefile.am, acinclude.m4, configure.in"
28         echo
29         echo "Not running Autoconf & Autoheader causes changes to the following user"
30         echo "files to be ignored:"
31         echo
32         echo "    acconfig.h, configure.in"
33 }
34
35 while getopts VACach-: opt; do
36         if test "x$opt" = "x-"; then
37                 case $OPTARG in
38                         help)
39                                 opt=h
40                                 ;;
41                         version)
42                                 opt=V
43                                 ;;
44                         autoconf)
45                                 opt=a
46                                 ;;
47                         noautoconf)
48                                 opt=A
49                                 ;;
50                         *)
51                                 opt=?
52                                 ;;
53                 esac
54         fi
55         case $opt in
56                 h)
57                         usage
58                         help
59                         exit 0
60                         ;;
61                 V)
62                         echo "CVS No Automake 0.1"
63                         exit 0
64                         ;;
65                 A)
66                         autoconf=false
67                         ;;
68                 a)
69                         autoconf=:
70                         ;;
71                 ?)
72                         usage >&2
73                         exit 2
74                         ;;
75         esac
76 done
77
78 # prevent aclocal from running
79 find . -name aclocal.m4 -exec touch {} \;
80
81 # prevent Automake from running
82 find . -name Makefile.in -exec touch {} \;
83
84 # prevent Autoheader from running
85 if $autoconf; then :; else
86         find . -name 'stamp-h?.in' -exec touch {} \;
87 fi
88
89 # prevent Autoconf from running
90 if $autoconf; then :; else
91         find . -name configure -exec touch {} \;
92 fi
Note: See TracBrowser for help on using the browser.