xref: /illumos-gate/usr/src/contrib/ast/src/lib/libast/Makefile (revision b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f)
1/*
2 * ast library
3 */
4
5:PACKAGE: ast
6
7LICENSE = since=1985,author=gsf+dgk+kpv
8
9ID = ast
10
11HOSTTYPE == "$(CC.HOSTTYPE)"
12
13CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)
14
15IFFEFLAGS = -v -X ast -X std
16
17.SOURCE : aso cdt comp dir disc hash man misc obsolete path port preroot \
18		regex sfio stdio string tm uwin vec vmalloc
19
20.SOURCE.h : include comp std cdt vmalloc
21
22CP = $(STDCP|"cp")
23
24PARANOID ==
25CONF_LIBPREFIX == "$(CC.PREFIX.DYNAMIC|CC.PREFIX.SHARED)"
26CONF_LIBSUFFIX == "$(CC.SUFFIX.DYNAMIC|CC.SUFFIX.SHARED)"
27DEBUG ==
28__OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
29
30HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
31	ast_namval.h ast_windows.h \
32	ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
33	ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \
34	ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
35	namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
36	sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
37	stack.h stak.h stk.h swap.h tar.h times.h tm.h tok.h \
38	usage.h vdb.h vecargs.h vmalloc.h wait.h wordexp.h \
39	bytesex.h endian.h fnmatch.h magicid.h fnv.h aso.h \
40	$(HEADERSTD)
41
42HEADERGEN = align.h preroot.h sig.h tmx.h tv.h \
43	$(ID)_api.h $(ID)_botch.h $(ID)_ccode.h $(ID)_fcntl.h $(ID)_float.h \
44	$(ID)_fs.h $(ID)_lib.h $(ID)_map.h $(ID)_mmap.h $(ID)_mode.h $(ID)_ndbm.h \
45	$(ID)_param.h $(ID)_sys.h $(ID)_time.h $(ID)_time.h $(ID)_tty.h \
46	$(ID)_vfork.h $(ID)_wait.h $(ID)_limits.h $(ID)_standards.h $(ID)_sizeof.h \
47	$(HEADERSTD:/^/$(ID)_/)
48
49HEADEREXP = $(ID)_common.h
50
51HEADEROPT = fmtmsg.h libgen.h syslog.h
52
53HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
54
55$(ID) 5.4 :LIBRARY: README RELEASE \
56	LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \
57	find.3 fmt.3 fmtls.3 fs3d.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
58	int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \
59	preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \
60	sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \
61	strerror.3 stresc.3 streval.3 strgid.3 strmatch.3 stropt.3 \
62	strperm.3 strsignal.3 strsort.3 strtape.3 strton.3 struid.3 \
63	swap.3 tab.3 tm.3 tmx.3 tok.3 touch.3 tv.3 vecargs.3 vmalloc.3 \
64	$(HEADERSRC) \
65	state.c transition.c \
66	dirlib.h opendir.c readdir.c rewinddir.c seekdir.c telldir.c \
67	getcwd.c fastfind.c \
68	hashlib.h hashalloc.c hashdump.c hashfree.c hashlast.c \
69	hashlook.c hashscan.c hashsize.c hashview.c hashwalk.c \
70	memhash.c memsum.c strhash.c strkey.c strsum.c \
71	stracmp.c strnacmp.c \
72	ccmap.c ccmapid.c ccnative.c \
73	chresc.c chrtoi.c streval.c strexpr.c strmatch.c strcopy.c \
74	modelib.h modei.c modex.c strmode.c \
75	strlcat.c strlcpy.c strlook.c strncopy.c strsearch.c strpsearch.c \
76	stresc.c stropt.c strtape.c strpcmp.c strnpcmp.c strvcmp.c strnvcmp.c \
77	tok.c tokline.c tokscan.c \
78	pathaccess.c pathcat.c pathcanon.c pathcheck.c pathpath.c \
79	pathexists.c pathfind.c pathkey.c pathprobe.c pathrepl.c \
80	pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
81	pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
82	pathprog.c \
83	fs3d.c ftwalk.c ftwflags.c fts.c \
84	astintercept.c conformance.c getenv.c setenviron.c \
85	optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \
86	magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \
87	error.c errorf.c errormsg.c errorx.c \
88	localeconv.c setlocale.c translate.c \
89	catopen.c iconv.c lc.c lctab.c mc.c \
90	base64.c recfmt.c recstr.c reclen.c fmtrec.c \
91	fmtbase.c fmtbuf.c fmtclock.c fmtdev.c fmtelapsed.c fmterror.c \
92	fmtesc.c fmtfmt.c fmtfs.c fmtident.c fmtint.c fmtip4.c fmtip6.c fmtls.c \
93	fmtmatch.c fmtmode.c fmtnum.c fmtperm.c fmtre.c fmttime.c fmtuid.c \
94	fmtgid.c fmtsignal.c fmtscale.c fmttmx.c fmttv.c fmtversion.c \
95	strelapsed.c strperm.c struid.c strgid.c \
96	strtoip4.c strtoip6.c stack.c stk.c \
97	swapget.c swapmem.c swapop.c swapput.c \
98	sigdata.c sigcrit.c sigunblock.c \
99	proclib.h procopen.c procclose.c procrun.c procfree.c \
100	tmdate.c tmequiv.c tmfix.c tmfmt.c tmform.c tmgoff.c tminit.c \
101	tmleap.c tmlex.c tmlocale.c tmmake.c tmpoff.c tmscan.c \
102	tmsleep.c tmtime.c tmtype.c tmweek.c tmword.c tmzone.c \
103	tmxdate.c tmxduration.c tmxfmt.c tmxgettime.c tmxleap.c tmxmake.c \
104	tmxscan.c tmxsettime.c tmxsleep.c tmxtime.c tmxtouch.c \
105	tvcmp.c tvgettime.c tvsettime.c tvsleep.c tvtouch.c \
106	cmdarg.c vecargs.c vecfile.c vecfree.c vecload.c vecstring.c \
107	univlib.h univdata.c touch.c mnt.c debug.c \
108	memccpy.c memchr.c memcmp.c memcpy.c memdup.c memmove.c memset.c \
109	mkdir.c mkfifo.c mknod.c rmdir.c remove.c rename.c link.c unlink.c \
110	strdup.c strchr.c strrchr.c strstr.c \
111	strtod.c strtold.c \
112	strtol.c strtoll.c strtoul.c strtoull.c strton.c strtonll.c \
113	strntod.c strntold.c strnton.c strntonll.c \
114	strntol.c strntoll.c strntoul.c strntoull.c \
115	strcasecmp.c strncasecmp.c strerror.c \
116	mktemp.c tmpnam.c fsync.c \
117	execlp.c execve.c execvp.c execvpe.c spawnveg.c \
118	vfork.c killpg.c \
119	hsearch.c tsearch.c \
120	getlogin.c putenv.c setenv.c unsetenv.c \
121	lstat.c statvfs.c \
122	eaccess.c gross.c gross_sgi.h omitted.c \
123	fakelink.h readlink.c symlink.c \
124	getpgrp.c setpgid.c setsid.c waitpid.c \
125	creat64.c fcntl.c open.c \
126	atexit.c getdents.c getwd.c dup2.c errno.c \
127	getpreroot.c ispreroot.c realopen.c setpreroot.c \
128	getgroups.c mount.c system.c iblocks.c \
129	modedata.c tmdata.c \
130	memfatal.c sfkeyprintf.c \
131	sfdcdio.c sfdcdos.c sfdcfilter.c sfdcseekable.c \
132	sfdcslow.c sfdcsubstr.c sfdctee.c sfdcunion.c \
133	sfdcmore.c sfdcprefix.c \
134	wc.c wc2utf8.c \
135	/* standards */ \
136	basename.c closelog.c dirname.c fmtmsglib.c fnmatch.c ftw.c \
137	getdate.c getsubopt.c glob.c nftw.c openlog.c re_comp.c \
138	resolvepath.c realpath.c regcmp.c regexp.c setlogmask.c strftime.c \
139	strptime.c swab.c syslog.c sysloglib.h tempnam.c \
140	wordexp.c mktime.c \
141	/* regex */ \
142	reglib.h regalloc.c regclass.c regcoll.c regcomp.c regcache.c \
143	regdecomp.c regerror.c regexec.c regfatal.c reginit.c regnexec.c \
144	regsubcomp.c regsubexec.c regsub.c regrecord.c regrexec.c regstat.c \
145	/* cdt */ \
146	dthdr.h dtclose.c dtdisc.c dthash.c dtlist.c dtmethod.c \
147	dtopen.c dtstrhash.c dttree.c dtview.c dtwalk.c \
148	dtnew.c dtcomp.c \
149	/* sfio */ \
150	sfhdr.h sfdchdr.h \
151	sfclose.c sfclrlock.c sfdisc.c sfdlen.c sfexcept.c \
152	sfgetl.c sfgetu.c sfcvt.c sfecvt.c sffcvt.c \
153	sfextern.c sffilbuf.c sfflsbuf.c sfprints.c sfgetd.c \
154	sfgetr.c sfllen.c sfmode.c sfmove.c sfnew.c \
155	sfpkrd.c sfnotify.c sfnputc.c sfopen.c sfpeek.c sfpoll.c \
156	sfpool.c sfpopen.c sfprintf.c sfputd.c sfputl.c sfputr.c \
157	sfputu.c sfrd.c sfread.c sfreserve.c sfscanf.c sfseek.c sfset.c \
158	sfsetbuf.c sfsetfd.c sfsize.c sfsk.c sfstack.c sfstrtod.c sfsync.c \
159	sfswap.c sftable.c sftell.c sftmp.c sfungetc.c sfvprintf.c \
160	sfvscanf.c sfwr.c sfwrite.c sfpurge.c sfraise.c sfwalk.c \
161	sfgetm.c sfmutex.c sfputm.c sfresize.c \
162	_sfclrerr.c _sfeof.c _sferror.c _sffileno.c \
163	_sfopen.c _sfstacked.c _sfvalue.c \
164	_sfgetc.c _sfgetl.c _sfgetl2.c _sfgetu.c _sfgetu2.c \
165	_sfdlen.c _sfllen.c _sfslen.c _sfulen.c \
166	_sfputc.c _sfputd.c _sfputl.c _sfputm.c _sfputu.c \
167	/* stdio */ \
168	clearerr.c fclose.c fdopen.c feof.c ferror.c fflush.c \
169	fgetc.c fgetpos.c fgets.c fileno.c fopen.c fprintf.c \
170	fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \
171	fseek.c fseeko.c fsetpos.c ftell.c ftello.c fwrite.c \
172	flockfile.c ftrylockfile.c funlockfile.c \
173	getc.c getchar.c getw.c pclose.c popen.c printf.c \
174	putc.c putchar.c puts.c putw.c rewind.c scanf.c \
175	setbuf.c setbuffer.c setlinebuf.c setvbuf.c \
176	snprintf.c sprintf.c sscanf.c \
177	asprintf.c vasprintf.c \
178	stdio/tmpfile.c ungetc.c vfprintf.c vfscanf.c vprintf.c \
179	vscanf.c vsnprintf.c vsprintf.c vsscanf.c \
180	_doprnt.c _doscan.c _filbuf.c _flsbuf.c _stdfun.c \
181	_stdopen.c _stdprintf.c _stdscanf.c _stdsprnt.c \
182	_stdvbuf.c _stdvsnprnt.c _stdvsprnt.c _stdvsscn.c \
183	/* wchar stdio */ \
184	fgetwc.c fwprintf.c putwchar.c vfwscanf.c wprintf.c \
185	fgetws.c fwscanf.c swprintf.c vswprintf.c wscanf.c \
186	fputwc.c getwc.c swscanf.c vswscanf.c \
187	fputws.c getwchar.c ungetwc.c vwprintf.c \
188	fwide.c putwc.c vfwprintf.c vwscanf.c \
189	/* stdio extensions */ \
190	stdio_c99.c fcloseall.c fmemopen.c getdelim.c getline.c \
191	/* math */ \
192	frexp.c frexpl.c \
193	/* ast */ \
194	astcopy.c astconf.c astdynamic.c astlicense.c astquery.c astwinsize.c \
195	conftab.c \
196	$(CC.LD.STATIC) aststatic.c getopt.c getoptl.c $(CC.LD.DYNAMIC) \
197	/* aso */ \
198	aso.c asolock.c asometh.c asorelax.c aso-sem.c aso-fcntl.c \
199	/* vmalloc */ \
200	vmalloc.h vmhdr.h vmbest.c vmclear.c vmclose.c vmdcheap.c vmdebug.c \
201	vmdisc.c vmexit.c vmlast.c vmopen.c vmpool.c vmprivate.c vmprofile.c \
202	vmregion.c vmsegment.c vmset.c vmstat.c vmstrdup.c vmtrace.c vmwalk.c \
203	vmmopen.c malloc.c vmgetmem.c \
204	/* uwin */ \
205	mathimpl.h rlib.h \
206	a64l.c acosh.c asinh.c atanh.c cbrt.c crypt.c erf.c \
207	err.c exp.c exp__E.c expm1.c gamma.c getpass.c lgamma.c log.c log1p.c \
208	log__L.c rand48.c random.c rcmd.c rint.c support.c \
209	/* obsolete */ \
210	sfstrtmp.c spawn.c \
211	-liconv -lw /* these should be pulled in by -lc */
212
213/*
214 * man is stdio.h problematic
215 * the std/stdio.h => ast_stdio.h runaround should
216 * get to a steady state
217 *
218 * also, -D_BLD_ast must be explicit for the uwin bootstrap
219 */
220
221.MAKEINIT : .AST.INIT
222.AST.INIT : .MAKE
223	CCFLAGS += -D_BLD_ast
224
225parameter	(_BLD_ast)
226virtual		ast/stdio.h
227
228		:NOPROTECT: sfprintf.c sfvprintf.c sfscanf.c sfvscanf.c
229
230		:NOOPTIMIZE: spawnveg.c
231"ibm.risc"	:NOOPTIMIZE: regcomp.c
232"linux.i386-64*":NOOPTIMIZE: sfset.c
233"sol?.*"	:NOOPTIMIZE: sfrd.c sfvprintf.c tmxfmt.c
234"win32*"	:NOOPTIMIZE: fastfind.c mc.c
235"win32*-64*"	:NOOPTIMIZE: sfvprintf.c
236
237/*
238 * NOTE: sun4 runtime link botches ro data so advertised sig_info is rw
239 */
240
241:READONLY: conftab.c lctab.c modedata.c /*sftable.c*/ \
242	/*sigdata.c*/ tmdata.c univdata.c
243
244:: atmain.C \
245	stdgets.c stdprintf.c stdscanf.c stdvbuf.c stdsprnt.c \
246	stdvsprnt.c stdvsnprnt.c stdvsscn.c stdopen.c \
247	astsa
248
249if "$(PWD:B)" != "cc-*"
250
251$(INCLUDEDIR) :INSTALLPROTO: $(HEADEREXP) $(HEADERSRC) $(HEADERGEN)
252
253:INSTALLDIR: conf
254
255conf :: conf.sh
256
257conflim.h conftab.h conftab.c :JOINT: conf conf.tab
258	$(*:O=1:P=A) $(IFFEFLAGS:V:N=-v) $(*:O>1) $(CC) $(CCFLAGS:VP:N!=-D_BLD_*|$\(*\)) /* 2007-07-01: $(CCFLAGS:VPX:N!=-D_BLD_*) */
259
260$(HEADERGEN) :COPY: FEATURE/$$(<:B:/$(ID)_//)
261
262ast_namval.h :COPY: namval.h
263
264lcgen : lcgen.c
265	$(CC.NATIVE|CC) -o $(<) $(*)
266
267lc.h lctab.c :JOINT: lcgen lc.tab
268	$(*:O=1:C,^[^/],./&,) $(tmp).1 $(tmp).2 < $(*:O=2) # :P=E: in 2006
269	$(PROTO) -p $(PROTOFLAGS) $(tmp).1 $(PROTOINSTALL) > $(tmp).3
270	$(RM) -f $(tmp).1
271	if	$(CMP) -s $(tmp).3 $(<:O=1)
272	then	$(RM) $(tmp).3
273	else	$(MV) $(tmp).3 $(<:O=1)
274	fi
275	if	$(CMP) -s $(tmp).2 $(<:O=2)
276	then	$(RM) $(tmp).2
277	else	$(MV) $(tmp).2 $(<:O=2)
278	fi
279
280$(LIBDIR)/file/magic :INSTALL: magic.tab
281
282:INSTALL: $(HEADEROPT:D=$(INCLUDEDIR):B:S)
283
284$(HEADEROPT:D=$(INCLUDEDIR):B:S) : $$(<:B:S) ast_lib.h
285	case $(CC.HOSTTYPE) in
286	win32.*)$(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
287		if	$(CMP) -s $(<) 1.$(tmp).x
288		then	$(RM) -f 1.$(tmp).x
289		else	$(MV) 1.$(tmp).x $(<)
290		fi
291		;;
292	*)	$(SILENT) $(GREP) -l 'define[ 	][ 	]*_[hl][di][rb]_$(<:B)' $(*:O>1) > /dev/null || {
293		$(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
294		if	$(CMP) -s $(<) 1.$(tmp).x
295		then	$(RM) -f 1.$(tmp).x
296		else	$(MV) 1.$(tmp).x $(<)
297		fi
298		}
299		;;
300	esac
301
302/*
303 * FEATURE/common for iffe probes, <ast_common.h> for ast source
304 * *but* <ast_common.h> may get pulled in by intercepted headers
305 * so both must be built very early
306 */
307
308$(ID)_common.h : .SCAN.IGNORE FEATURE/common
309	$(SED) '/define _def_map_ast/d' < $(*) > 1.$(tmp).x
310	if	$(CMP) -s $(<) 1.$(tmp).x
311	then	$(RM) -f 1.$(tmp).x
312	else	$(MV) 1.$(tmp).x $(<)
313	fi
314
315FEATURE/common : .SCAN.IGNORE
316
317/*
318 * more stdio.h complications ...
319 * prepare for compilation by generating these headers first;
320 * this helps mam by catching headers that might be indirectly
321 * included on other systems
322 */
323
324.check.hdr : .IGNORE .VIRTUAL \
325		FEATURE/standards - FEATURE/lib - FEATURE/common - \
326		FEATURE/param - FEATURE/aso - \
327		ast_map.h - ast_limits.h - ast_stdio.h ast_nl_types.h - \
328		ast_wchar.h ast_wctype.h
329	: clean up obsolete headers :
330	$(RM) -rf $(HEADERSTD) ast_hdr.h ast_types.h ast_unistd.h iffeio.h \
331		$(INCLUDEDIR)/limits.h $(INCLUDEDIR)/unistd.h \
332		$(PACKAGEROOT)/src/lib/libast/std/limits.h
333
334ast.req : .check.hdr .check.lib
335
336else
337
338ast.req : .check.lib
339
340end
341
342/*
343 * some systems move -lc routines to -lm
344 * see astmath.c for details
345 */
346
347.check.lib : .AFTER astmath.exe FEATURE/aso
348	$(SED) -e '/^#define _REQ_/!d' -e 's/#define _REQ_\([a-z0-9_]*\).*/ -l\1/' $(*:N=FEATURE/*) >> $(<<)
349	if	test -f astmath.exe
350	then	touch $(<<)
351	else	echo ' -lm' >> $(<<)
352	fi
353
354astmath.exe : .DONTCARE astmath.c
355	X=1
356	for N in 1 2 3 4 5 6 8
357	do	if	$(CC) -DN=$N -DIS $(CCFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) 2>/dev/null
358		then	: implicit math function N=$N :
359		elif	$(CC) -DN=$N -DIS $(CCFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) -lm 2>/dev/null
360		then	: math function N=$N requires -lm :
361			X=0
362			break
363		fi
364	done
365	case $X in
366	0)	$(RM) -f $(*:N=*.c:B:S=.exe) ;;
367	*)	touch $(*:N=*.c:B:S=.exe) ;;
368	esac
369	$(RM) -f $(*:N=*.c:B:S=$(CC.SUFFIX.OBJECT))
370
371/*
372 * atmain.C is the only C++ and only for a few systems
373 */
374
375atmain.o : atmain.C
376	ignore $(CC) -c $(CCFLAGS) $(*)
377	if	test ! -f $(<)
378	then	$(CP) $(*) $(*:B:S=.cpp)
379		ignore $(CC) -c $(CCFLAGS) $(*:B:S=.cpp)
380		if	test ! -f $(<)
381		then	$(CP) $(*) $(*:B:S=.c)
382			$(CC) -c $(CCFLAGS) $(*:B:S=.c)
383		fi
384	fi
385
386/* astsa is a standalone subset of ast for imbedded applications */
387
388PAXFILTER = ;*.[ch];$(PROTO) $(PROTOFLAGS) -c "" -p
389
390ast_sa.h : .DONTCARE
391
392astsa.tgz : $$("astsa/astsa.manifest":T=F:T=I:/[[:space:]][[:space:]]*/ /G:C,^,astsa/,)
393	$(PAX) $(PAXFLAGS) -wf $(<) -x $(<:/.*\.//) -s ',.*/,,' -A $(PAXFILTER:@Q) $(*)
394
395/* libmini.a is a bootstrap dll for uwin cc -D_BLD_ast that exports part of ast */
396
397MINI = mini
398
399:: $(MINI).sym
400
401if CC.HOSTTYPE == "win32*"
402
403DLL = $(ID)$(VERSION:/[^0-9]//G)
404
405$(MINI) : $(MINI)$$(CC.SUFFIX.SHARED)
406
407$(MINI)$$(CC.SUFFIX.SHARED) : $(MINI).sym $(ID)
408	$(RM) -rf $(MINI).tmp
409	mkdir $(MINI).tmp
410	{
411	echo LIBRARY $(DLL:F=%(upper)s)
412	echo
413	echo SECTIONS
414	echo .data READ WRITE
415	echo
416	echo EXPORTS
417	cat $(*:N=*.sym)
418	} > $(MINI).tmp/$(DLL)$(CC.SUFFIX.LD:O=1)
419	cd $(MINI).tmp
420	$(LD) $(CCFLAGS:N=-[gG]*) $(CC.SHARED) -o $(DLL) $(DLL)$(CC.SUFFIX.LD:O=1) $(*$(ID).so/$(DLL)$(CC.SUFFIX.DYNAMIC):C,^[^-],../&,)
421	cd ..
422	$(MV) $(MINI).tmp/$(DLL)$(CC.SUFFIX.SHARED) $(<)
423	$(RM) -rf $(MINI).tmp
424
425end
426
427:MSGKEY: misc/magic.tab
428	$(SED) \
429		-e '/^#/d' \
430		-e '/[^	]*		*[^	]*		*[^	]*		*./!d' \
431		-e 's,^[^	]*		*[^	]*		*[^	]*		*\(.[^	]*\).*$,\1,' \
432		-e 's,[\\"],\\&,g' \
433		-e 's,.*,"&",' \
434		$(*)
435