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:
committed by
sin
parent
a19aad7c70
commit
136f012d23
6
Makefile
6
Makefile
@@ -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
|
||||
|
Reference in New Issue
Block a user