rename config.h to made_config.h and add to .gitignore
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
SICServer
|
||||
made_config.h
|
||||
*.aux
|
||||
*.pdf
|
||||
*.sw[op]
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
#!/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_VERSION=$(bash extract_version.sh VERSION)
|
||||
SICS_REVISION=$(bash extract_version.sh REVISION)
|
||||
echo "#define SICS_SITE \"$SICS_SITE\"" >> config_new.h
|
||||
echo "#define SICS_VERSION \"$SICS_VERSION\"" >> config_new.h
|
||||
echo "#define SICS_REVISION \"$SICS_REVISION\"" >> config_new.h
|
||||
echo "#define SICS_SITE \"$SICS_SITE\"" >> made_config_new.h
|
||||
echo "#define SICS_VERSION \"$SICS_VERSION\"" >> made_config_new.h
|
||||
echo "#define SICS_REVISION \"$SICS_REVISION\"" >> made_config_new.h
|
||||
if [[ -f /usr/include/valgrind/memcheck.h ]]
|
||||
then
|
||||
echo "#define SICS_VALGRIND" >> config_new.h
|
||||
echo "#define SICS_VALGRIND" >> made_config_new.h
|
||||
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 ]]
|
||||
then
|
||||
echo "config not changed"
|
||||
rm -f config_new.h
|
||||
rm -f made_config_new.h
|
||||
else
|
||||
echo "config updated"
|
||||
mv -f --backup config_new.h config.h
|
||||
mv -f --backup made_config_new.h made_config.h
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
$Name: not supported by cvs2svn $
|
||||
$Revision: 1.23.2.5 $
|
||||
-----------------------------------------------------------------------*/
|
||||
#include "config.h"
|
||||
#include "made_config.h"
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <glob.h>
|
||||
|
||||
Reference in New Issue
Block a user