GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / share / automake-1.11 / am / scripts.am
blob790cb649fa881de26a185b446f9c8699e2f7ef10
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007,
3 ## 2008, 2009 Free Software Foundation, Inc.
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 if %?INSTALL%
19 include inst-vars.am
20 endif %?INSTALL%
22 ## ------------ ##
23 ## Installing.  ##
24 ## ------------ ##
26 if %?INSTALL%
27 ## if doesn't work properly for Automake variables yet.
28 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
29 .PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
30 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
31         @$(NORMAL_INSTALL)
32         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
33 ## Funny invocation because Makefile variable can be empty, leading to
34 ## a syntax error in sh.
35         @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
36 ?!BASE? $(am__nobase_strip_setup); \
37         for p in $$list; do \
38 ## A file can be in the source directory or the build directory.
39           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
40 ## A script may or may not exist.
41           if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
42         done | \
43 ## We now have a list of "sourcefile newline (nobase-)target" pairs.
44 ## Turn that into "sourcefile source_base target_dir xformed_target_base",
45 ## with newlines being turned into spaces in a second step.
46         sed -e 'p;s,.*/,,;n' \
47 ?BASE?      -e 'h;s|.*|.|' \
48 ?!BASE?     -e "s|$$srcdirstrip/||" -e 'h;s|[^/]*$$||; s|^$$|.|' \
49             -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
50         $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
51           { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
52             if ($$2 == $$4) { files[d] = files[d] " " $$1; \
53               if (++n[d] == $(am__install_max)) { \
54                 print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
55             else { print "f", d "/" $$4, $$1 } } \
56           END { for (d in files) print "f", d, files[d] }' | \
57         while read type dir files; do \
58 ?!BASE?   case $$type in \
59 ?!BASE?   d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
60 ?!BASE?      $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
61 ?!BASE?   f) \
62              if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
63              test -z "$$files" || { \
64                echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
65                $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
66              } \
67 ?!BASE?   ;; esac \
68         ; done
69 endif %?INSTALL%
72 ## -------------- ##
73 ## Uninstalling.  ##
74 ## -------------- ##
76 if %?INSTALL%
77 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
78 uninstall-%DIR%SCRIPTS:
79         @$(NORMAL_UNINSTALL)
80         @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
81 ?BASE?  files=`for p in $$list; do echo "$$p"; done | \
82 ?BASE?         sed -e 's,.*/,,;$(transform)'`; \
83 ?!BASE? $(am__nobase_strip_setup); \
84 ?!BASE? files=`$(am__nobase_strip) \
85 ?!BASE?        -e 'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,'`; \
86         test -n "$$list" || exit 0; \
87         echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
88         cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
89 endif %?INSTALL%
92 ## -------------- ##
93 ## Distributing.  ##
94 ## -------------- ##
96 if %?DIST%
97 DIST_COMMON += %DISTVAR%
98 endif %?DIST%
101 ## ---------- ##
102 ## Checking.  ##
103 ## ---------- ##
105 if %?CK-OPTS%
106 .PHONY installcheck-am: installcheck-%DIR%SCRIPTS
107 installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
108         bad=0; pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
109           case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
110 ## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
111 ## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
112            *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
113           esac; \
114 ## Strip any leading directory before applying $(transform).
115           f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
116 ## Insert the directory back if nobase_ is used.
117 ?!BASE?   f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
118           for opt in --help --version; do \
119             if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
120                  2>c$${pid}_.err </dev/null \
121                  && test -n "`cat c$${pid}_.out`" \
122                  && test -z "`cat c$${pid}_.err`"; then :; \
123             else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
124           done; \
125         done; rm -f c$${pid}_.???; exit $$bad
126 endif %?CK-OPTS%