rename config.h to made_config.h and add to .gitignore

This commit is contained in:
Douglas Clowes
2013-08-02 09:23:15 +10:00
parent 77bb495fe2
commit 61c11d5741
3 changed files with 11 additions and 10 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
SICServer SICServer
made_config.h
*.aux *.aux
*.pdf *.pdf
*.sw[op] *.sw[op]

View File

@@ -1,24 +1,24 @@
#!/bin/bash #!/bin/bash
# #
# Write a new config.h, but only if changed # Write a new made_config.h, but only if changed
# #
rm -f config_new.h rm -f made_config_new.h
SICS_SITE=$(bash extract_version.sh SITE) SICS_SITE=$(bash extract_version.sh SITE)
SICS_VERSION=$(bash extract_version.sh VERSION) SICS_VERSION=$(bash extract_version.sh VERSION)
SICS_REVISION=$(bash extract_version.sh REVISION) SICS_REVISION=$(bash extract_version.sh REVISION)
echo "#define SICS_SITE \"$SICS_SITE\"" >> config_new.h echo "#define SICS_SITE \"$SICS_SITE\"" >> made_config_new.h
echo "#define SICS_VERSION \"$SICS_VERSION\"" >> config_new.h echo "#define SICS_VERSION \"$SICS_VERSION\"" >> made_config_new.h
echo "#define SICS_REVISION \"$SICS_REVISION\"" >> config_new.h echo "#define SICS_REVISION \"$SICS_REVISION\"" >> made_config_new.h
if [[ -f /usr/include/valgrind/memcheck.h ]] if [[ -f /usr/include/valgrind/memcheck.h ]]
then then
echo "#define SICS_VALGRIND" >> config_new.h echo "#define SICS_VALGRIND" >> made_config_new.h
fi fi
delta=$(diff -q config.h config_new.h 2>> /dev/null) delta=$(diff -q made_config.h made_config_new.h 2>> /dev/null)
if [[ $? == 0 ]] if [[ $? == 0 ]]
then then
echo "config not changed" echo "config not changed"
rm -f config_new.h rm -f made_config_new.h
else else
echo "config updated" echo "config updated"
mv -f --backup config_new.h config.h mv -f --backup made_config_new.h made_config.h
fi fi

View File

@@ -11,7 +11,7 @@
$Name: not supported by cvs2svn $ $Name: not supported by cvs2svn $
$Revision: 1.23.2.5 $ $Revision: 1.23.2.5 $
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
#include "config.h" #include "made_config.h"
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <glob.h> #include <glob.h>