mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-18 05:36:41 +02:00
Recompile version related files on codebase change
This commit is contained in:
parent
10242479cd
commit
01ac544053
17
Makefile.in
17
Makefile.in
|
@ -65,6 +65,12 @@ RHEL = 0
|
|||
RHEL_VERSION = 0
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard .git/HEAD),"")
|
||||
VERSION = $(shell git describe --tags)
|
||||
else
|
||||
VERSION = $(version)
|
||||
endif
|
||||
|
||||
SOURCES = \
|
||||
src/main.d \
|
||||
src/config.d \
|
||||
|
@ -101,12 +107,8 @@ clean:
|
|||
distclean: clean
|
||||
rm -f Makefile contrib/pacman/PKGBUILD contrib/spec/onedrive.spec onedrive.1 $(system_unit_files) $(user_unit_files)
|
||||
|
||||
version:
|
||||
if [ -f .git/HEAD ] ; then \
|
||||
git describe --tags > version ; \
|
||||
else \
|
||||
echo $(version) > version ; \
|
||||
fi
|
||||
version: $(SOURCES)
|
||||
echo "$(VERSION)" > version;
|
||||
|
||||
$(EXE): $(OBJ)
|
||||
$(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl -of$@ $^
|
||||
|
@ -114,6 +116,9 @@ $(EXE): $(OBJ)
|
|||
%.o: %.d
|
||||
$(DC) $(DCFLAGS) -c $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl -of=$@ $<
|
||||
|
||||
# ensure that version is ready
|
||||
src/main.o: src/main.d version
|
||||
|
||||
install: all
|
||||
$(INSTALL) -D onedrive $(DESTDIR)$(bindir)/onedrive
|
||||
$(INSTALL) -D -m 0644 onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
|
||||
|
|
Loading…
Reference in a new issue