-remove debug message
[oweals/gnunet.git] / bin / dosubst.awk
1 # Dedicated to the public domain.
2 # SPDX-License-Identifier: 0BSD
3 #
4 # awk script to substitute variables in scripts and applications.
5 #
6 # You can pass these variables to it in Makefiles or on the
7 # commandline:
8 #  bdir="$(bindir)"
9 #  py="$(PYTHON)"
10 #  awkay="$(AWK_BINARY)"
11 #  pfx="$(prefix)"
12 #  prl="$(PERL)"
13 #  sysconfdirectory="$(sysconfdir)"
14 #  pkgdatadirectory="$(pkgdatadir)"
15
16 {
17
18   if (/@bindirectory@/) {
19     gsub("@bindirectory@",bdir) ;
20   }
21
22   if (/@PYTHONEXE@/) {
23     gsub("@PYTHONEXE@",py) ;
24   }
25
26   if (/@AWKEXE@/) {
27     gsub("@AWKEXE@",awkay) ;
28   }
29
30   if (/@SUBSTPREFIX@/) {
31     gsub("@SUBSTPREFIX@",pfx) ;
32   }
33
34   if (/@PERLEXE@/) {
35     gsub("@PERLEXE@",prl) ;
36   }
37
38   if (/@SYSCONFDIR@/) {
39     gsub("@SYSCONFDIR@",sysconfdirectory) ;
40   }
41
42   if (/@PKGDATADIRECTORY@/) {
43     gsub("@PKGDATADIRECTORY@",pkgdatadirectory) ;
44   }
45
46   print $0 ;
47 }