Compare commits

..

No commits in common. "dbda7e15b0d9d45db55f3b90510e4181e7388fa6" and "11474a652c3a5f9b7359495186f85281bce27dad" have entirely different histories.

4 changed files with 0 additions and 41 deletions

View File

@ -1,27 +0,0 @@
OBJECTS = main.o
TARGET = hello
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) -o $@ $^
main.o: | new_header
main.o: version.h
new_header:
@sed -e "s/<version>/$$(git describe)/g" \
<version.h.in> version.h.tmp
@if diff -q version.h.tmp version.h > /dev/null 2>&1; \
then \
rm version.h.tmp; \
else \
echo "version.h.in => version.h" ; \
mv version.h.tmp version.h;\
fi
clean:
rm -f $(TARGET) $(OBJECTS) version.h
.PHONY: all clean

View File

@ -1,8 +0,0 @@
#include "version.h"
#include <stdio.h>
int main(){
printf("Hello, world. \n");
printf("version: %s. \n", _VERSION);
return 0;
}

View File

@ -1,6 +0,0 @@
#ifndef HELLO_WORLD_VERSION_H
#define HELLO_WORLD_VERSION_H
#define _VERSION "old_practise"
#endif

View File