Remove ifdef hell from getconf.c

Every system is going to have a different configuration
so the only solution is to put an ifdef guard for every
value.  To do this, we generate the header at compile time
with a shell script.
This commit is contained in:
Roberto E. Vargas Caballero
2015-12-14 21:22:43 +01:00
committed by sin
parent a19aad7c70
commit 136f012d23
3 changed files with 235 additions and 227 deletions

View File

@@ -188,6 +188,11 @@ $(LIBUTIL): $(LIBUTILOBJ)
$(AR) rc $@ $?
$(RANLIB) $@
getconf.c: confstr_l.h limits_l.h sysconf_l.h pathconf_l.h
confstr_l.h limits_l.h sysconf_l.h pathconf_l.h: getconf.sh
./getconf.sh
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
@@ -239,6 +244,7 @@ sbase-box-install: sbase-box
clean:
rm -f $(BIN) $(OBJ) $(LIB) sbase-box sbase-$(VERSION).tar.gz
rm -f confstr_l.h limits_l.h sysconf_l.h pathconf_l.h
.PHONY:
all install uninstall dist sbase-box sbase-box-install clean