Makefile按名称构建子目录(Makefile build subdirectories by name)
我有一个golang monolith repo,里面有多个应用程序。 我在每个应用程序根目录中都有Makefile,我必须像
root/app1/
一样在app目录中运行make build
。 我希望在每个服务中摆脱这些相同的Makefile,并拥有一个顶级的Makefile,我可以使用它来一次构建所有应用程序,每个应用程序创建单独的可执行文件或仅构建特定的应用程序。 就像是make build app1 # builds only app1 make build # builds all apps
实现这一目标的明显方法是为所有应用程序设置目标并具有构建命令,但是想知道是否有更简单的方法来做到这一点,甚至不在Makefile中为每个目标重复构建命令
I have a golang monolith repo with multiple apps in it. I have Makefile in each app root and I have to be in the app directory like
root/app1/
to runmake build
. I want to get rid of these identical Makefile's in each service and have a top level Makefile that I can use to build all apps at once each creating individual executables or build specific app only. Something likemake build app1 # builds only app1 make build # builds all apps
Obvious way to achieve this is to have targets for all apps and have build commands, but wanted to know if there is an easier way to do this by just not even repeating that build command per target in Makefile
原文:https://stackoverflow.com/questions/44035793
最满意答案
感谢那! 我现在正在使用Mint 16。 求助:使用以下:从pymouse导入PyMouse m = PyMouse()m.move(0,0)
要注意我必须安装python-xlib
sudo apt-get install python-xlib
Thanks for that! I am using Mint 16 at the moment. SOLVED: Used the following: from pymouse import PyMouse m = PyMouse() m.move(0, 0)
To note I had to install the python-xlib
sudo apt-get install python-xlib
相关问答
更多-
鼠标光标未显示(Mouse cursor are not shown)[2021-07-05]
您正在异步调用方法(使用BeginInvoke )。 而是同步调用它(使用Invoke )。 Application.Current.Dispatcher.Invoke((Action)(() => { System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; })); BeginInvoke在调度程序上对委托进行排队,并将基于异步调度程序优先级执行它。 ... -
如何使用鼠标光标在屏幕上最大化WPF窗口?(How can I make a WPF window maximized on the screen with the mouse cursor?)[2022-09-26]
您可以在XAML中进行设置 -
游标分隔不是由应用程序完成的,而是由Windows本身完成的。 据我所知,没有办法让你的光标离开屏幕。 你可以通过做许多游戏做的事来模拟你想要的。 不要绘制Windows光标,在您的应用程序窗口中绘制一个自定义的光标。 强制真正的光标(未绘制)留在显示器的中央。 每当用户移动实际光标时,相应地移动应用程序的光标并将实际光标重新放置到屏幕的中心。 这会给你想要的幻觉,但我不认为WPF可以处理这个问题。 Cursor delimiting is not done by the application, but ...
-
在Windows应用程序中无法将鼠标指针自动移动到中心。 这是避免在应用程序中欺骗/欺骗(不是正确的词,但仍然足够接近)用户。 例如 ,如果允许开发人员这样做,那么在点击鼠标按钮之前,开发人员总是可以隐藏鼠标指针并将其移动到所需位置并点击广告 ,即使用户不想这样做所以! 这也适用于Windows 8 / 8.1应用程序设计原则,即应用程序可以使用有限的系统资源。 Moving mouse pointer automatically to center is not possible in Windows a ...
-
我使用了GetRawInputData而不是鼠标屏幕坐标。 它就像一个魅力。 在事件处理程序中 LRESULT CALLBACK Application::StaticWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) ... case WM_INPUT: { UINT dwSize = 40; static BYTE lpb[40]; GetRawInputData((HRAWINPUT)lParam, RI ...
-
我会使用Screen Class。 var screenList:Array = Screen.screens; stage.nativeWindow.x = screenList[0].visibleBounds.left; stage.nativeWindow.y = screenList[0].visibleBounds.top; I would use the Screen Class. var screenList:Array = Screen.screens; stage.nativeWi ...
-
如何在C#中将鼠标光标位置设置到屏幕上的指定点?(How to Set mouse cursor position to a specified point on screen in C#?)[2023-07-09]
以下将设置鼠标位置并执行单击: public static void ClickSomePoint() { // Set the cursor position System.Windows.Forms.Cursor.Position = new Point(20, 35); DoClickMouse(0x2); // Left mouse button down DoClickMouse(0x4); // Left mouse button up } static ... -
将鼠标光标重新定位在屏幕上(Relocate mouse cursor on screen)[2023-06-28]
感谢那! 我现在正在使用Mint 16。 求助:使用以下:从pymouse导入PyMouse m = PyMouse()m.move(0,0) 要注意我必须安装python-xlib sudo apt-get install python-xlib Thanks for that! I am using Mint 16 at the moment. SOLVED: Used the following: from pymouse import PyMouse m = PyMouse() m.move(0 ... -
不显示鼠标光标(Not displaying Mouse cursor)[2023-11-24]
看来,framebuffer没有给我鼠标光标,所以我正在绘制自己的,这是代码片段,可能对你们有帮助, -(CGImageRef)appendMouseCursor:(CGImageRef)pSourceImage{ // get the cursor image NSPoint mouseLoc; mouseLoc = [NSEvent mouseLocation]; //get cur NSLog(@"Mouse location is x=%d,y=%d",(int ... -
Cocoa在鼠标移动时监听鼠标移动事件,而不是光标(Cocoa listen for mouse move events when the mouse moves, not the cursor)[2022-11-07]
隐藏光标时,调用CGAssociateMouseAndMouseCursorPosition(FALSE) 。 这将使鼠标移动不移动光标。 移动鼠标时,您将继续获取NSEventTypeMouseMoved , NSEventTypeLeftMouseDragged , NSEventTypeRightMouseDragged和NSEventTypeOtherMouseDragged事件(取决于移动期间是否按下按钮)。 因为光标没有移动,所以locationInWindow没有意义。 它将继续报告从光标与鼠 ...