1 # Additional editing of Makefiles
2 /@GMSGFMT@/ s,\$GMSGFMT,msgfmt,
3 /@MSGFMT@/ s,\$MSGFMT,msgfmt,
4 /@XGETTEXT@/ s,\$XGETTEXT,xgettext,
5 /ac_given_INSTALL=/,/^CEOF/ {
7 # DJGPP specific Makefile changes.\
8 /^aliaspath[ ]*=/s,:,";",g\
10 lispdir = \\$(prefix)/gnu/emacs/site-lisp\
11 /TEXINPUTS[ ]*=/s,:,";",g\
15 s,\\.tab\\.c,_tab.c,g\
16 s,\\.tab\\.h,_tab.h,g\
17 s,\\([1-9]\\)\\.html\\.in,\\1hi,g\
18 s,\\([1-9]\\)\\.html,\\1-html,g\
19 s,\\([1-9]\\)\\.in,\\1-in,g\
20 s,\\.sh\\.in,.sh-in,g\
21 @append_list_of_renamed_files@
22 s,gettext_\\*\\.,gettext.*-,g\
23 s,format-librep,format_librep,g\
24 s,format-pascal,format_pascal,g\
25 /^TESTS[ ]*=/,/^$/ s,plural-\\([1-9]\\+\\),plural.\\1,g\
26 /^install-info-am:/,/^$/ {\
27 /@list=/ s,\\\$(INFO_DEPS),& gettext.i,\
28 s,file-\\[0-9\\]\\[0-9\\],& \\$\\$file[0-9] \\$\\$file[0-9][0-9],\
30 /^iso-639\\.texi[ ]*:.*$/ {\
31 s,iso-639,\\$(srcdir)/&,g\
32 s,ISO_639,\\$(srcdir)/&,\
34 /^iso-3166\\.texi[ ]*:.*$/ {\
35 s,iso-3166,\\$(srcdir)/&,g\
36 s,ISO_3166,\\$(srcdir)/&,\
38 /^# Some rules for yacc handling\\./,$ {\
40 -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\\\
41 -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
43 /^POTFILES:/,/^$/ s,\\\$@-t,t-\\$@,g\
45 s,po-gram-gen2\\.h,po-gram_gen2.h,g\
46 /^Makefile[ ]*:/,/^$/ {\
47 /CONFIG_FILES=/ s,\\\$(subdir)/\\\$@\\.in,&:\\$(subdir)/\\$@.in-in,\
49 /html:/ s,split$,monolithic,g\
50 /^TEXI2HTML[ ]*=/ s,=[ ]*,&-,
53 # javacomp.sh is renamed to javacomp.sh-in,
54 # javaexec.sh is renamed to javaexec.sh-in,
55 # Makefile.in.in is renamed to Makefile.in-in...
56 /^CONFIG_FILES=/,/^EOF/ {
57 s|lib/javacomp\.sh|&:lib/javacomp.sh-in|
58 s|lib/javaexec\.sh|&:lib/javaexec.sh-in|
59 s|po/Makefile\.in|&:po/Makefile.in-in|
62 # ...and config.h.in into config.h-in
63 /^ *CONFIG_HEADERS=/,/^EOF/ {
64 s|config\.h|&:config.h-in|
67 # The same as above but this time
68 # for configure scripts created with Autoconf 2.14a.
69 /^config_files="\\\\/,/^$/ {
70 s|po/Makefile\.in|&:po/Makefile.in-in|
72 /^config_headers="\\\\/,/^$/ {
73 s|config\.h|&:config.h-in|
75 /# Handling of arguments./,/^$/ {
76 s|po/Makefile\.in|&:po/Makefile.in-in|2
77 s|config\.h|&:config.h-in|2
80 # Replace `(command) > /dev/null` with `command > /dev/null`, since
81 # parenthesized commands always return zero status in the ported Bash,
82 # even if the named command doesn't exist
83 /if [^{].*null/,/ then/ {
90 # DOS-style absolute file names should be supported as well
91 /\*) srcdir=/s,/\*,[\\\\/]* | [A-z]:[\\\\/]*,
92 /\$]\*) INSTALL=/s,\[/\$\]\*,[\\\\/$]* | [A-z]:[\\\\/]*,
93 /\$]\*) ac_rel_source=/s,\[/\$\]\*,[\\\\/$]* | [A-z]:[\\\\/]*,
95 # Switch the order of the two Sed commands, since DOS path names
96 # could include a colon
97 /ac_file_inputs=/s,\( -e "s%\^%\$ac_given_srcdir/%"\)\( -e "s%:% $ac_given_srcdir/%g"\),\2\1,
99 # Prevent the spliting of conftest.subs.
100 # The sed script: conftest.subs is split into 48 or 90 lines long files.
101 # This will produce sed scripts called conftest.s1, conftest.s2, etc.
102 # that will not work if conftest.subs contains a multi line sed command
103 # at line #90. In this case the first part of the sed command will be the
104 # last line of conftest.s1 and the rest of the command will be the first lines
105 # of conftest.s2. So both script will not work properly.
106 # This matches the configure script produced by Autoconf 2.12
107 /ac_max_sed_cmds=[0-9]/ s,=.*$,=`sed -n "$=" conftest.subs`,
108 # This matches the configure script produced by Autoconf 2.14a
109 /ac_max_sed_lines=[0-9]/ s,=.*$,=`sed -n "$=" $ac_cs_root.subs `,
111 # The following two items are changes needed for configuring
112 # and compiling across partitions.
113 # 1) The given srcdir value is always translated from the
114 # "x:" syntax into "/dev/x" syntax while we run configure.
115 /^[ ]*-srcdir=\*.*$/ a\
116 ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
117 /set X `ls -Lt \$srcdir/ i\
118 if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
119 srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
122 # 2) We need links across partitions, so we will use "cp -pf" instead of "ln".
123 /# Make a symlink if possible; otherwise try a hard link./,/EOF/ {
124 s,;.*then, 2>/dev/null || cp -pf \$srcdir/\$ac_source \$ac_dest&,
127 # Let libtool use _libs all the time.
128 /objdir=/s,\.libs,_libs,
130 # Stock djdev203 does not provide an unsetenv() function,
131 # so we will use djdev204 CVS tree's one.
132 /^LTLIBOBJS=/ s,|, unsetenv.c |,
134 # Stock djdev203 does not provide pw_gecos,
135 # so we will use djdev204 CVS tree's one.
136 /^LTLIBOBJS=/ s,|, getpwnam.c |,