Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify makefile #103

Merged
merged 1 commit into from
Nov 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ temp_copy:
@GOPATH=$(ABS_TEMP_GOPATH) go get github.com/cossacklabs/acra/cmd/...


build: temp_copy
install: temp_copy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here make install do not the same as in other our products. here it will copy binaries to REPO_DIR/build (

BIN_PATH = build
) when other our products place binaries to /usr/lib/*. I think we should install acra binaries to /usr/bin as default
and after changing path is important to drop this command -

acra/Makefile

Line 48 in fa860a2

@rm -rf $(BIN_PATH)
and explicitly list all binaries that should be deleted (acraproxy, acraserver, acra_genkeys, acra_rollback, acra_genpoisonrecord, acra_addzone) or it will delete /usr/bin folder when user will run sudo make clean :)

@mkdir -p $(BIN_PATH)
@cp $(TEMP_GOPATH)/bin/* $(BIN_PATH)

# alias for unification with other products
install_all: install

clean:
@rm -rf $(BIN_PATH)
@rm -rf $(TEMP_GOPATH)
Expand All @@ -57,6 +60,9 @@ test_python:
GOPATH=$(ABS_TEMP_GOPATH) $(BIN_PATH)/test_env/bin/python $(ABS_TEMP_GOPATH)/src/github.com/cossacklabs/acra/tests/test.py

test: temp_copy test_go

# alias for unification with other products
test_all: test


PACKAGE_NAME = acra
Expand Down Expand Up @@ -100,7 +106,7 @@ RPM_SUMMARY = "Acra helps you easily secure your databases in distributed, micro
unpack_dist:
@tar -xf $(DIST_FILENAME)

deb: build
deb: install
@mkdir -p '$(BIN_PATH)/deb'

@fpm --input-type dir \
Expand All @@ -122,7 +128,7 @@ deb: build
@find $(BIN_PATH) -name \*.deb


rpm: build
rpm: install
@mkdir -p $(BIN_PATH)/rpm
@fpm --input-type dir \
--output-type rpm \
Expand Down