summary refs log tree commit diff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 18:24:12 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:40:05 +1000
commitf97c2127a619c956f0a330f272877a3fa4074f94 (patch)
tree69abddf606a01c61ef79ebd5c33abf9306b5a4d9 /src/Makefile.am
parent[SIGNAL] Added default implementation of killpg (diff)
downloaddash-f97c2127a619c956f0a330f272877a3fa4074f94.tar.gz
dash-f97c2127a619c956f0a330f272877a3fa4074f94.zip
[BUILTIN] Disable ulimit if there is no getrlimit
For systems without getrlimit (e.g., klibc) we will disable ulimit.

In order to achieve this, builtins.def is now produced by cpp which
allows us to use macros such as HAVE_GETRLIMIT in it.

Thie also means that we can get rid of the cflags parsing code in
mkbuiltins.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d8acd39..0fe4db1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,19 +35,22 @@ HELPERS = mkinit mksyntax mknodes mksignames
 BUILT_SOURCES = arith.h builtins.h nodes.h syntax.h token.h
 CLEANFILES = \
 	$(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \
-	arith.c $(HELPERS)
+	arith.c $(HELPERS) builtins.def
 
 man_MANS = dash.1
 EXTRA_DIST = \
 	$(man_MANS) \
-	mktokens mkbuiltins builtins.def mkinit.c \
+	mktokens mkbuiltins builtins.def.in mkinit.c \
 	mknodes.c nodetypes nodes.c.pat mksyntax.c mksignames.c
 
 token.h: mktokens
 	sh $^
 
-builtins.c builtins.h: mkbuiltins shell.h builtins.def
-	sh $^ . '$(CFLAGS)'
+builtins.def: builtins.def.in $(top_builddir)/config.h
+	$(COMPILE) -E -x c -o $@ $<
+
+builtins.c builtins.h: mkbuiltins builtins.def
+	sh $^
 
 init.c: mkinit $(dash_CFILES)
 	./$^